X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/llvm/InitializeLLVMWin.cpp?ds=inline diff --git a/llvm/InitializeLLVMWin.cpp b/llvm/InitializeLLVMWin.cpp index f60d4ca..c56b897 100644 --- a/llvm/InitializeLLVMWin.cpp +++ b/llvm/InitializeLLVMWin.cpp @@ -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 @@ -33,21 +33,17 @@ 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(GetProcAddress(library, symbolName)); - if (initializer) - llvm = initializer(WTFLogAlwaysAndCrash); + return bitwise_cast(GetProcAddress(library, symbolName)); } } // namespace JSC