Changeset 182483 in webkit for trunk/Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp
- Timestamp:
- Apr 7, 2015, 12:41:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp
r180622 r182483 1 1 /* 2 * Copyright (C) 2013 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 36 36 namespace JSC { 37 37 38 typedef void (*LoggerFunction)(const char*, ...) WTF_ATTRIBUTE_PRINTF(1, 2); 39 typedef LLVMAPI* (*InitializerFunction)(LoggerFunction); 40 41 void initializeLLVMPOSIX(const char* libraryName) 38 LLVMInitializerFunction getLLVMInitializerFunctionPOSIX(const char* libraryName, bool verbose) 42 39 { 43 const bool verbose =44 Options::verboseFTLCompilation()45 || Options::showFTLDisassembly()46 || Options::verboseFTLFailure()47 || Options::verboseCompilation()48 || Options::showDFGDisassembly()49 || Options::showDisassembly();50 51 40 int flags = RTLD_NOW; 52 41 … … 64 53 if (verbose) 65 54 dataLog("Failed to load LLVM library at ", libraryName, ": ", dlerror(), "\n"); 66 return ;55 return nullptr; 67 56 } 68 57 69 58 const char* symbolName = "initializeAndGetJSCLLVMAPI"; 70 InitializerFunction initializer = bitwise_cast<InitializerFunction>(59 LLVMInitializerFunction initializer = bitwise_cast<LLVMInitializerFunction>( 71 60 dlsym(library, symbolName)); 72 61 if (!initializer) { 73 62 if (verbose) 74 63 dataLog("Failed to find ", symbolName, " in ", libraryName, ": ", dlerror()); 75 return ;64 return nullptr; 76 65 } 77 66 78 llvm = initializer(WTFLogAlwaysAndCrash); 79 if (!llvm) { 80 if (verbose) 81 dataLog("LLVM initilization failed.\n"); 82 } 67 return initializer; 83 68 } 84 69
Note:
See TracChangeset
for help on using the changeset viewer.