]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - llvm/InitializeLLVMWin.cpp
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / llvm / InitializeLLVMWin.cpp
index f60d4caa2af051c01b41f142fe724178c0aa112b..c56b8974b9d10b13279111019b32157ab0198913 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace JSC {
 
-typedef LLVMAPI* (*InitializerFunction)(void(*)(const char*, ...));
-
-void initializeLLVMImpl()
+LLVMInitializerFunction getLLVMInitializerFunction(bool /* verbose */)
 {
     const wchar_t* libraryName = L"libllvmForJSC.dll";
 
     HMODULE library = ::LoadLibrary(libraryName);
 
     if (!library)
-        return;
+        return nullptr;
 
     const char* symbolName = "initializeAndGetJSCLLVMAPI";
-    InitializerFunction initializer = bitwise_cast<InitializerFunction>(GetProcAddress(library, symbolName));
-    if (initializer)
-        llvm = initializer(WTFLogAlwaysAndCrash);
+    return bitwise_cast<LLVMInitializerFunction>(GetProcAddress(library, symbolName));
 }
 
 } // namespace JSC