WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 155.55 KB, created by
Filip Pizlo
on 2013-10-09 20:15:41 PDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2013-10-09 20:15:41 PDT
Size:
155.55 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 157205) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,150 @@ >+2013-10-09 Filip Pizlo <fpizlo@apple.com> >+ >+ FTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time destructors >+ https://bugs.webkit.org/show_bug.cgi?id=122566 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The JSC project now builds a libllvmForJSC.dylib. If FTL is enabled, this >+ gets copied into JavaScriptCore.framework/Versions/A/Libraries. JSC will >+ load the dylib by finding it using NSBundle APIs and then doing dlopen(). >+ That will only happen lazily, when something happens that requires LLVM. >+ >+ This mostly takes care of LLVM static initialization overhead by deferring >+ it until it's really needed. >+ >+ This takes care of LLVM's exit-time destructors because inside >+ libllvmForJSC.dylib, we override __cxa_atexit. >+ >+ * Configurations/JavaScriptCore.xcconfig: >+ * Configurations/LLVMForJSC.xcconfig: Added. >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * dfg/DFGPlan.cpp: >+ (JSC::DFG::Plan::compileInThreadImpl): >+ * disassembler/LLVMDisassembler.cpp: >+ (JSC::tryToDisassembleWithLLVM): >+ * ftl/FTLAbbreviatedTypes.h: >+ * ftl/FTLAbbreviations.h: >+ (JSC::FTL::voidType): >+ (JSC::FTL::int1Type): >+ (JSC::FTL::int8Type): >+ (JSC::FTL::int16Type): >+ (JSC::FTL::int32Type): >+ (JSC::FTL::int64Type): >+ (JSC::FTL::intPtrType): >+ (JSC::FTL::floatType): >+ (JSC::FTL::doubleType): >+ (JSC::FTL::pointerType): >+ (JSC::FTL::structType): >+ (JSC::FTL::functionType): >+ (JSC::FTL::typeOf): >+ (JSC::FTL::mdKindID): >+ (JSC::FTL::mdString): >+ (JSC::FTL::mdNode): >+ (JSC::FTL::setMetadata): >+ (JSC::FTL::addFunction): >+ (JSC::FTL::setLinkage): >+ (JSC::FTL::setFunctionCallingConv): >+ (JSC::FTL::getParam): >+ (JSC::FTL::constInt): >+ (JSC::FTL::constReal): >+ (JSC::FTL::constIntToPtr): >+ (JSC::FTL::constBitCast): >+ (JSC::FTL::appendBasicBlock): >+ (JSC::FTL::insertBasicBlock): >+ (JSC::FTL::buildPhi): >+ (JSC::FTL::addIncoming): >+ (JSC::FTL::buildAlloca): >+ (JSC::FTL::buildAdd): >+ (JSC::FTL::buildSub): >+ (JSC::FTL::buildMul): >+ (JSC::FTL::buildDiv): >+ (JSC::FTL::buildRem): >+ (JSC::FTL::buildNeg): >+ (JSC::FTL::buildFAdd): >+ (JSC::FTL::buildFSub): >+ (JSC::FTL::buildFMul): >+ (JSC::FTL::buildFDiv): >+ (JSC::FTL::buildFRem): >+ (JSC::FTL::buildFNeg): >+ (JSC::FTL::buildAnd): >+ (JSC::FTL::buildOr): >+ (JSC::FTL::buildXor): >+ (JSC::FTL::buildShl): >+ (JSC::FTL::buildAShr): >+ (JSC::FTL::buildLShr): >+ (JSC::FTL::buildNot): >+ (JSC::FTL::buildLoad): >+ (JSC::FTL::buildStore): >+ (JSC::FTL::buildSExt): >+ (JSC::FTL::buildZExt): >+ (JSC::FTL::buildFPToSI): >+ (JSC::FTL::buildFPToUI): >+ (JSC::FTL::buildSIToFP): >+ (JSC::FTL::buildUIToFP): >+ (JSC::FTL::buildIntCast): >+ (JSC::FTL::buildFPCast): >+ (JSC::FTL::buildIntToPtr): >+ (JSC::FTL::buildPtrToInt): >+ (JSC::FTL::buildBitCast): >+ (JSC::FTL::buildICmp): >+ (JSC::FTL::buildFCmp): >+ (JSC::FTL::buildCall): >+ (JSC::FTL::setTailCall): >+ (JSC::FTL::buildExtractValue): >+ (JSC::FTL::buildSelect): >+ (JSC::FTL::buildBr): >+ (JSC::FTL::buildCondBr): >+ (JSC::FTL::buildSwitch): >+ (JSC::FTL::addCase): >+ (JSC::FTL::buildRet): >+ (JSC::FTL::buildUnreachable): >+ (JSC::FTL::dumpModule): >+ (JSC::FTL::verifyModule): >+ * ftl/FTLCompile.cpp: >+ (JSC::FTL::compile): >+ * ftl/FTLFail.cpp: >+ (JSC::FTL::fail): >+ * ftl/FTLJITCode.h: >+ * ftl/FTLJITFinalizer.h: >+ * ftl/FTLLink.cpp: >+ * ftl/FTLLowerDFGToLLVM.cpp: >+ (JSC::FTL::LowerDFGToLLVM::lower): >+ * ftl/FTLOutput.cpp: >+ (JSC::FTL::Output::Output): >+ (JSC::FTL::Output::~Output): >+ * ftl/FTLOutput.h: >+ (JSC::FTL::Output::appendTo): >+ * ftl/FTLState.cpp: >+ (JSC::FTL::State::State): >+ (JSC::FTL::State::~State): >+ * ftl/WebKitLLVMLibraryAnchor.cpp: Removed. >+ * jsc.cpp: >+ (jscmain): >+ * llvm: Added. >+ * llvm/InitializeLLVM.cpp: Added. >+ (JSC::initializeLLVM): >+ * llvm/InitializeLLVM.h: Added. >+ * llvm/InitializeLLVMMac.mm: Added. >+ (JSC::initializeLLVMImpl): >+ * llvm/InitializeLLVMPOSIX.cpp: Added. >+ (JSC::initializeLLVMPOSIX): >+ * llvm/InitializeLLVMPOSIX.h: Added. >+ * llvm/LLVMAPI.cpp: Added. >+ * llvm/LLVMAPI.h: Added. >+ * llvm/LLVMAPIFunctions.h: Added. >+ * llvm/LLVMHeaders.h: Added. >+ * llvm/library: Added. >+ * llvm/library/LLVMAnchor.cpp: Added. >+ * llvm/library/LLVMExports.cpp: Added. >+ (initializeAndGetJSCLLVMAPI): >+ * llvm/library/LLVMOverrides.cpp: Added. >+ (__cxa_atexit): >+ * llvm/library/config_llvm.h: Added. >+ * runtime/InitializeThreading.cpp: >+ (JSC::initializeThreadingOnce): >+ * runtime/Options.h: >+ > 2013-10-09 Filip Pizlo <fpizlo@apple.com> > > Minor clean-ups in the JSC Xcode project. >Index: Source/JavaScriptCore/jsc.cpp >=================================================================== >--- Source/JavaScriptCore/jsc.cpp (revision 157204) >+++ Source/JavaScriptCore/jsc.cpp (working copy) >@@ -846,10 +846,10 @@ int jscmain(int argc, char** argv) > // Note that the options parsing can affect VM creation, and thus > // comes first. > CommandLine options(argc, argv); >- RefPtr<VM> vm = VM::create(LargeHeap); >+ VM* vm = VM::create(LargeHeap).leakRef(); > int result; > { >- APIEntryShim shim(vm.get()); >+ APIEntryShim shim(vm); > > if (options.m_profile && !vm->m_perBytecodeProfiler) > vm->m_perBytecodeProfiler = adoptPtr(new Profiler::Database(*vm)); >@@ -870,14 +870,6 @@ int jscmain(int argc, char** argv) > } > } > >- if (Options::neverDeleteVMInCommandLine()) { >- JSC::VM* temp = vm.release().leakRef(); >- UNUSED_PARAM(temp); >- } else { >- JSLockHolder lock(*vm); >- vm.clear(); >- } >- > return result; > } > >Index: Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig >=================================================================== >--- Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig (revision 157204) >+++ Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig (working copy) >@@ -35,15 +35,11 @@ JSVALUE_MODEL_x86_64 = 64; > // Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols. > OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-all_load; > >-OTHER_LDFLAGS_LLVM = $(OTHER_LDFLAGS_LLVM_$(ENABLE_FTL_JIT)); >-OTHER_LDFLAGS_LLVM_ = ; >-OTHER_LDFLAGS_LLVM_ENABLE_FTL_JIT = -lpthread -lm -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMIRReader -lLLVMAsmParser -lLLVMMCDisassembler -lLLVMMCParser -lLLVMInstrumentation -lLLVMBitReader -lLLVMInterpreter -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMBitWriter -lLLVMMCJIT -lLLVMJIT -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport; >- > OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS); > OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME)); > OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE); > OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos); >-OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_LLVM) -sub_library libobjc -framework CoreServices; >+OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -framework CoreServices; > GCC_PREFIX_HEADER = JavaScriptCorePrefix.h; > GCC_SYMBOLS_PRIVATE_EXTERN = YES; > HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS); >Index: Source/JavaScriptCore/Configurations/LLVMForJSC.xcconfig >=================================================================== >--- Source/JavaScriptCore/Configurations/LLVMForJSC.xcconfig (revision 0) >+++ Source/JavaScriptCore/Configurations/LLVMForJSC.xcconfig (working copy) >@@ -0,0 +1,44 @@ >+// Copyright (C) 2013 Apple Inc. All rights reserved. >+// >+// Redistribution and use in source and binary forms, with or without >+// modification, are permitted provided that the following conditions >+// are met: >+// 1. Redistributions of source code must retain the above copyright >+// notice, this list of conditions and the following disclaimer. >+// 2. Redistributions in binary form must reproduce the above copyright >+// notice, this list of conditions and the following disclaimer in the >+// documentation and/or other materials provided with the distribution. >+// >+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+#include "FeatureDefines.xcconfig" >+#include "Version.xcconfig" >+ >+// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols. >+OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-all_load; >+ >+OTHER_LDFLAGS_LLVM = $(OTHER_LDFLAGS_LLVM_$(ENABLE_FTL_JIT)); >+OTHER_LDFLAGS_LLVM_ = ; >+OTHER_LDFLAGS_LLVM_ENABLE_FTL_JIT = -lpthread -lm -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMIRReader -lLLVMAsmParser -lLLVMMCDisassembler -lLLVMMCParser -lLLVMInstrumentation -lLLVMBitReader -lLLVMInterpreter -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMBitWriter -lLLVMMCJIT -lLLVMJIT -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport; >+ >+OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS); >+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME)); >+OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE); >+OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos); >+OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_LLVM) >+GCC_SYMBOLS_PRIVATE_EXTERN = YES; >+HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS); >+ >+PRODUCT_NAME = llvmForJSC; >+EXECUTABLE_PREFIX = lib; >+ >Index: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (revision 157204) >+++ Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (working copy) >@@ -257,7 +257,6 @@ > 0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63948215E48114006A597C /* DFGArrayMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 0F6E5C191724AF3D005C574F /* WebKitLLVMLibraryAnchor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F6E5C181724AF3D005C574F /* WebKitLLVMLibraryAnchor.cpp */; }; > 0F7025A91714B0FA00382C0E /* DFGOSRExitCompilerCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7025A71714B0F800382C0E /* DFGOSRExitCompilerCommon.cpp */; }; > 0F7025AA1714B0FC00382C0E /* DFGOSRExitCompilerCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7025A81714B0F800382C0E /* DFGOSRExitCompilerCommon.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F714CA116EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.cpp */; }; >@@ -372,6 +371,22 @@ > 0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC815141405118D00CFA603 /* VTableSpectrum.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC815121405118600CFA603 /* VTableSpectrum.cpp */; }; > 0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFAB01805CA6D00472CE4 /* InitializeLLVM.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFAB11805CA6D00472CE4 /* InitializeLLVMMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */; }; >+ 0FCEFAC11805D94E00472CE4 /* LLVMOverrides.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */; }; >+ 0FCEFAC31805E74000472CE4 /* LLVMExports.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */; }; >+ 0FCEFACA1805E75500472CE4 /* InitializeLLVM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */; }; >+ 0FCEFACB1805E75500472CE4 /* InitializeLLVMPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */; }; >+ 0FCEFACC1805E75500472CE4 /* InitializeLLVMPOSIX.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */; }; >+ 0FCEFACE1805E75500472CE4 /* LLVMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFACF1805E75500472CE4 /* LLVMAPIFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFAD11805E77900472CE4 /* LLVMAPIFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */; }; >+ 0FCEFAD31805EDCC00472CE4 /* LLVMHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAD21805EDCC00472CE4 /* LLVMHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FCEFAD41805EDCC00472CE4 /* LLVMHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAD21805EDCC00472CE4 /* LLVMHeaders.h */; }; >+ 0FCEFAD71806174600472CE4 /* LLVMAnchor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAD61806174600472CE4 /* LLVMAnchor.cpp */; }; >+ 0FCEFADA180620DA00472CE4 /* LLVMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */; }; >+ 0FCEFADC18064A1400472CE4 /* config_llvm.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFADB18064A1400472CE4 /* config_llvm.h */; }; > 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */; }; > 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; }; >@@ -1181,6 +1196,13 @@ > /* End PBXBuildFile section */ > > /* Begin PBXContainerItemProxy section */ >+ 0FCEFABC1805D66300472CE4 /* PBXContainerItemProxy */ = { >+ isa = PBXContainerItemProxy; >+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; >+ proxyType = 1; >+ remoteGlobalIDString = 0FCEFAB51805D61600472CE4; >+ remoteInfo = llvmForJSC; >+ }; > 0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */ = { > isa = PBXContainerItemProxy; > containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; >@@ -1471,7 +1493,6 @@ > 0F63948215E48114006A597C /* DFGArrayMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArrayMode.h; path = dfg/DFGArrayMode.h; sourceTree = "<group>"; }; > 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAdjacencyList.h; path = dfg/DFGAdjacencyList.h; sourceTree = "<group>"; }; > 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGEdge.h; path = dfg/DFGEdge.h; sourceTree = "<group>"; }; >- 0F6E5C181724AF3D005C574F /* WebKitLLVMLibraryAnchor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebKitLLVMLibraryAnchor.cpp; path = ftl/WebKitLLVMLibraryAnchor.cpp; sourceTree = "<group>"; }; > 0F7025A71714B0F800382C0E /* DFGOSRExitCompilerCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExitCompilerCommon.cpp; path = dfg/DFGOSRExitCompilerCommon.cpp; sourceTree = "<group>"; }; > 0F7025A81714B0F800382C0E /* DFGOSRExitCompilerCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExitCompilerCommon.h; path = dfg/DFGOSRExitCompilerCommon.h; sourceTree = "<group>"; }; > 0F714CA116EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGBackwardsPropagationPhase.cpp; path = dfg/DFGBackwardsPropagationPhase.cpp; sourceTree = "<group>"; }; >@@ -1598,6 +1619,21 @@ > 0FC815141405118D00CFA603 /* VTableSpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTableSpectrum.h; sourceTree = "<group>"; }; > 0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitorInlines.h; sourceTree = "<group>"; }; > 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserError.h; sourceTree = "<group>"; }; >+ 0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitializeLLVM.h; path = llvm/InitializeLLVM.h; sourceTree = "<group>"; }; >+ 0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InitializeLLVMMac.mm; path = llvm/InitializeLLVMMac.mm; sourceTree = "<group>"; }; >+ 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libllvmForJSC.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = LLVMForJSC.xcconfig; sourceTree = "<group>"; }; >+ 0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMOverrides.cpp; sourceTree = "<group>"; }; >+ 0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMExports.cpp; sourceTree = "<group>"; }; >+ 0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitializeLLVM.cpp; path = llvm/InitializeLLVM.cpp; sourceTree = "<group>"; }; >+ 0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitializeLLVMPOSIX.cpp; path = llvm/InitializeLLVMPOSIX.cpp; sourceTree = "<group>"; }; >+ 0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitializeLLVMPOSIX.h; path = llvm/InitializeLLVMPOSIX.h; sourceTree = "<group>"; }; >+ 0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLVMAPI.cpp; path = llvm/LLVMAPI.cpp; sourceTree = "<group>"; }; >+ 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLVMAPI.h; path = llvm/LLVMAPI.h; sourceTree = "<group>"; }; >+ 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLVMAPIFunctions.h; path = llvm/LLVMAPIFunctions.h; sourceTree = "<group>"; }; >+ 0FCEFAD21805EDCC00472CE4 /* LLVMHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLVMHeaders.h; path = llvm/LLVMHeaders.h; sourceTree = "<group>"; }; >+ 0FCEFAD61806174600472CE4 /* LLVMAnchor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMAnchor.cpp; sourceTree = "<group>"; }; >+ 0FCEFADB18064A1400472CE4 /* config_llvm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config_llvm.h; sourceTree = "<group>"; }; > 0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; }; > 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; }; > 0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = "<group>"; }; >@@ -2431,6 +2467,13 @@ > /* End PBXFileReference section */ > > /* Begin PBXFrameworksBuildPhase section */ >+ 0FCEFAB31805D61600472CE4 /* Frameworks */ = { >+ isa = PBXFrameworksBuildPhase; >+ buildActionMask = 2147483647; >+ files = ( >+ ); >+ runOnlyForDeploymentPostprocessing = 0; >+ }; > 0FF922C614F46B130041A24E /* Frameworks */ = { > isa = PBXFrameworksBuildPhase; > buildActionMask = 2147483647; >@@ -2499,6 +2542,7 @@ > 141211200A48793C00480255 /* minidom */, > 14BD59BF0A3E8F9000BAF59C /* testapi */, > 6511230514046A4C002B101D /* testRegExp */, >+ 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */, > ); > name = Products; > sourceTree = "<group>"; >@@ -2531,6 +2575,7 @@ > 1429D77A0ED20D7300B89619 /* interpreter */, > 1429D92C0ED22D7000B89619 /* jit */, > 0F46809C14BA7F4D00BFE272 /* llint */, >+ 0FCEFAAD1805CA4400472CE4 /* llvm */, > 7E39D8370EC3A388003AF11A /* parser */, > 034768DFFF38A50411DB9C8B /* Products */, > 95AB831A0DA42C6900BC83F3 /* profiler */, >@@ -2588,6 +2633,35 @@ > name = llint; > sourceTree = "<group>"; > }; >+ 0FCEFAAD1805CA4400472CE4 /* llvm */ = { >+ isa = PBXGroup; >+ children = ( >+ 0FCEFABF1805D94100472CE4 /* library */, >+ 0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */, >+ 0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */, >+ 0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */, >+ 0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */, >+ 0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */, >+ 0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */, >+ 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */, >+ 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */, >+ 0FCEFAD21805EDCC00472CE4 /* LLVMHeaders.h */, >+ ); >+ name = llvm; >+ sourceTree = "<group>"; >+ }; >+ 0FCEFABF1805D94100472CE4 /* library */ = { >+ isa = PBXGroup; >+ children = ( >+ 0FCEFADB18064A1400472CE4 /* config_llvm.h */, >+ 0FCEFAD61806174600472CE4 /* LLVMAnchor.cpp */, >+ 0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */, >+ 0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */, >+ ); >+ name = library; >+ path = llvm/library; >+ sourceTree = "<group>"; >+ }; > 0FEA09FC1705137F00BB722C /* ftl */ = { > isa = PBXGroup; > children = ( >@@ -2651,7 +2725,6 @@ > 0FDB2CC8173DA51E007B3C1B /* FTLValueFromBlock.h */, > 0F235BCF17178E1C00690C7F /* FTLValueSource.cpp */, > 0F235BD017178E1C00690C7F /* FTLValueSource.h */, >- 0F6E5C181724AF3D005C574F /* WebKitLLVMLibraryAnchor.cpp */, > ); > name = ftl; > sourceTree = "<group>"; >@@ -3008,6 +3081,7 @@ > 1C90513E0BA9E8830081E9D0 /* Configurations */ = { > isa = PBXGroup; > children = ( >+ 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */, > 1C9051450BA9E8A70081E9D0 /* Base.xcconfig */, > 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */, > 449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */, >@@ -3882,6 +3956,17 @@ > /* End PBXGroup section */ > > /* Begin PBXHeadersBuildPhase section */ >+ 0FCEFAB41805D61600472CE4 /* Headers */ = { >+ isa = PBXHeadersBuildPhase; >+ buildActionMask = 2147483647; >+ files = ( >+ 0FCEFAD41805EDCC00472CE4 /* LLVMHeaders.h in Headers */, >+ 0FCEFADA180620DA00472CE4 /* LLVMAPI.h in Headers */, >+ 0FCEFAD11805E77900472CE4 /* LLVMAPIFunctions.h in Headers */, >+ 0FCEFADC18064A1400472CE4 /* config_llvm.h in Headers */, >+ ); >+ runOnlyForDeploymentPostprocessing = 0; >+ }; > 144005C70A5338C60005F061 /* Headers */ = { > isa = PBXHeadersBuildPhase; > buildActionMask = 2147483647; >@@ -3940,6 +4025,7 @@ > 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */, > 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, > 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */, >+ 0FCEFAD31805EDCC00472CE4 /* LLVMHeaders.h in Headers */, > BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */, > 0F73D7AF165A143000ACAB71 /* ClosureCallStubRoutine.h in Headers */, > 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */, >@@ -3970,6 +4056,7 @@ > C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */, > C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */, > C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */, >+ 0FCEFACF1805E75500472CE4 /* LLVMAPIFunctions.h in Headers */, > 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */, > 0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */, > 0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */, >@@ -4087,6 +4174,7 @@ > 86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */, > A7D89D0017A0B8CC00773AD8 /* DFGSSAConversionPhase.h in Headers */, > 0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */, >+ 0FCEFACC1805E75500472CE4 /* InitializeLLVMPOSIX.h in Headers */, > 0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */, > 0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */, > 0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */, >@@ -4193,6 +4281,7 @@ > A78853FA17972629001440E4 /* IntendedStructureChain.h in Headers */, > BC11667B0E199C05008066DD /* InternalFunction.h in Headers */, > 1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */, >+ 0FCEFAB01805CA6D00472CE4 /* InitializeLLVM.h in Headers */, > 860BD801148EA6F200112B2F /* Intrinsic.h in Headers */, > BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */, > BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */, >@@ -4246,6 +4335,7 @@ > A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */, > 0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */, > 0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */, >+ 0FCEFACE1805E75500472CE4 /* LLVMAPI.h in Headers */, > 978801411471AD920041B016 /* JSDateMath.h in Headers */, > C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */, > 86E3C614167BABD7006D760A /* JSExport.h in Headers */, >@@ -4563,6 +4653,23 @@ > /* End PBXHeadersBuildPhase section */ > > /* Begin PBXNativeTarget section */ >+ 0FCEFAB51805D61600472CE4 /* llvmForJSC */ = { >+ isa = PBXNativeTarget; >+ buildConfigurationList = 0FCEFAB71805D61600472CE4 /* Build configuration list for PBXNativeTarget "llvmForJSC" */; >+ buildPhases = ( >+ 0FCEFAB21805D61600472CE4 /* Sources */, >+ 0FCEFAB31805D61600472CE4 /* Frameworks */, >+ 0FCEFAB41805D61600472CE4 /* Headers */, >+ ); >+ buildRules = ( >+ ); >+ dependencies = ( >+ ); >+ name = llvmForJSC; >+ productName = llvmForJSC; >+ productReference = 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */; >+ productType = "com.apple.product-type.library.dynamic"; >+ }; > 0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */ = { > isa = PBXNativeTarget; > buildConfigurationList = 0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */; >@@ -4643,6 +4750,7 @@ > 3732811A17FCD235004AD519 /* Postprocess Headers */, > 932F5B910822A1C700736975 /* Sources */, > 932F5BD20822A1C700736975 /* Frameworks */, >+ 0FCEFAD91806191800472CE4 /* Copy LLVM Library Into Framework */, > 5D29D8BE0E9860B400C3D2D0 /* Check For Weak VTables and Externals */, > 3713F014142905240036387F /* Check For Inappropriate Objective-C Class Names */, > A55DEAA416703DF7003DB841 /* Check For Inappropriate Macros in External Headers */, >@@ -4650,6 +4758,7 @@ > buildRules = ( > ); > dependencies = ( >+ 0FCEFABD1805D66300472CE4 /* PBXTargetDependency */, > 65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */, > ); > name = JavaScriptCore; >@@ -4710,6 +4819,7 @@ > 0F4680A914BA7FD900BFE272 /* LLInt Offsets */, > 0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */, > 5D6B2A47152B9E17005231DE /* Test Tools */, >+ 0FCEFAB51805D61600472CE4 /* llvmForJSC */, > ); > }; > /* End PBXProject section */ >@@ -4731,6 +4841,21 @@ > shellPath = /bin/sh; > shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/LLIntDesiredOffsets.h\"\n"; > }; >+ 0FCEFAD91806191800472CE4 /* Copy LLVM Library Into Framework */ = { >+ isa = PBXShellScriptBuildPhase; >+ buildActionMask = 2147483647; >+ files = ( >+ ); >+ inputPaths = ( >+ "$(BUILT_PRODUCTS_DIR)/libllvmForJSC.dylib", >+ ); >+ name = "Copy LLVM Library Into Framework"; >+ outputPaths = ( >+ ); >+ runOnlyForDeploymentPostprocessing = 0; >+ shellPath = /bin/sh; >+ shellScript = "if [[ $ENABLE_FTL_JIT != \"ENABLE_FTL_JIT\" ]]\nthen\n exit 0\nfi\n\n# Copy the llvmForJSC library into the framework.\nditto \"${BUILT_PRODUCTS_DIR}/libllvmForJSC.dylib\" \"${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Libraries/libllvmForJSC.dylib\"\nln -fs \"Versions/Current/Libraries\" \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Libraries\""; >+ }; > 3713F014142905240036387F /* Check For Inappropriate Objective-C Class Names */ = { > isa = PBXShellScriptBuildPhase; > buildActionMask = 2147483647; >@@ -4778,7 +4903,7 @@ > ); > runOnlyForDeploymentPostprocessing = 0; > shellPath = /bin/sh; >- shellScript = "# FIXME: <rdar://problem/13539888> LLVM libraries shouldn't have weak vtables\nexit 0\n\nif [ -f ../../Tools/Scripts/check-for-weak-vtables-and-externals ]; then\n ../../Tools/Scripts/check-for-weak-vtables-and-externals || exit $?\nfi"; >+ shellScript = "if [ -f ../../Tools/Scripts/check-for-weak-vtables-and-externals ]; then\n ../../Tools/Scripts/check-for-weak-vtables-and-externals || exit $?\nfi"; > }; > 5D2F7CF90C6875BB00B5B72B /* Update Info.plist with version information */ = { > isa = PBXShellScriptBuildPhase; >@@ -4876,6 +5001,16 @@ > /* End PBXShellScriptBuildPhase section */ > > /* Begin PBXSourcesBuildPhase section */ >+ 0FCEFAB21805D61600472CE4 /* Sources */ = { >+ isa = PBXSourcesBuildPhase; >+ buildActionMask = 2147483647; >+ files = ( >+ 0FCEFAC31805E74000472CE4 /* LLVMExports.cpp in Sources */, >+ 0FCEFAD71806174600472CE4 /* LLVMAnchor.cpp in Sources */, >+ 0FCEFAC11805D94E00472CE4 /* LLVMOverrides.cpp in Sources */, >+ ); >+ runOnlyForDeploymentPostprocessing = 0; >+ }; > 0FF922C414F46B130041A24E /* Sources */ = { > isa = PBXSourcesBuildPhase; > buildActionMask = 2147483647; >@@ -4936,6 +5071,7 @@ > 14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */, > 148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */, > 1428082D107EC0570013E7B2 /* CallData.cpp in Sources */, >+ 0FCEFAB11805CA6D00472CE4 /* InitializeLLVMMac.mm in Sources */, > 1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */, > 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */, > 0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */, >@@ -5075,6 +5211,7 @@ > 0F235BD117178E1C00690C7F /* FTLCArgumentGetter.cpp in Sources */, > 0FEA0A271709623B00BB722C /* FTLCommonValues.cpp in Sources */, > 0FEA0A0B170513DB00BB722C /* FTLCompile.cpp in Sources */, >+ 0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */, > 0F235BD317178E1C00690C7F /* FTLExitArgument.cpp in Sources */, > 0F235BD517178E1C00690C7F /* FTLExitArgumentForOperand.cpp in Sources */, > 0F235BD817178E1C00690C7F /* FTLExitThunkGenerator.cpp in Sources */, >@@ -5092,6 +5229,7 @@ > 0F235BE117178E1C00690C7F /* FTLThunks.cpp in Sources */, > 0F235BE317178E1C00690C7F /* FTLValueFormat.cpp in Sources */, > 0F235BE517178E1C00690C7F /* FTLValueSource.cpp in Sources */, >+ 0FCEFACA1805E75500472CE4 /* InitializeLLVM.cpp in Sources */, > 147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */, > 0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */, > 147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */, >@@ -5259,6 +5397,7 @@ > 95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */, > 0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */, > 0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */, >+ 0FCEFACB1805E75500472CE4 /* InitializeLLVMPOSIX.cpp in Sources */, > 0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */, > 0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */, > 0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */, >@@ -5338,7 +5477,6 @@ > 14E84F9E14EE1ACC00D6D5D4 /* WeakBlock.cpp in Sources */, > 14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */, > 14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */, >- 0F6E5C191724AF3D005C574F /* WebKitLLVMLibraryAnchor.cpp in Sources */, > 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */, > 0F24E55817F74EDB00ABB217 /* ValueRecovery.cpp in Sources */, > A7E5AB3A1799E4B200D2833D /* X86Disassembler.cpp in Sources */, >@@ -5361,6 +5499,11 @@ > /* End PBXSourcesBuildPhase section */ > > /* Begin PBXTargetDependency section */ >+ 0FCEFABD1805D66300472CE4 /* PBXTargetDependency */ = { >+ isa = PBXTargetDependency; >+ target = 0FCEFAB51805D61600472CE4 /* llvmForJSC */; >+ targetProxy = 0FCEFABC1805D66300472CE4 /* PBXContainerItemProxy */; >+ }; > 0FF922D314F46B2F0041A24E /* PBXTargetDependency */ = { > isa = PBXTargetDependency; > target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */; >@@ -5437,6 +5580,34 @@ > }; > name = Production; > }; >+ 0FCEFAB81805D61600472CE4 /* Debug */ = { >+ isa = XCBuildConfiguration; >+ baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */; >+ buildSettings = { >+ }; >+ name = Debug; >+ }; >+ 0FCEFAB91805D61600472CE4 /* Release */ = { >+ isa = XCBuildConfiguration; >+ baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */; >+ buildSettings = { >+ }; >+ name = Release; >+ }; >+ 0FCEFABA1805D61600472CE4 /* Profiling */ = { >+ isa = XCBuildConfiguration; >+ baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */; >+ buildSettings = { >+ }; >+ name = Profiling; >+ }; >+ 0FCEFABB1805D61600472CE4 /* Production */ = { >+ isa = XCBuildConfiguration; >+ baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */; >+ buildSettings = { >+ }; >+ name = Production; >+ }; > 0FF922CB14F46B130041A24E /* Debug */ = { > isa = XCBuildConfiguration; > baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */; >@@ -5741,6 +5912,17 @@ > defaultConfigurationIsVisible = 0; > defaultConfigurationName = Production; > }; >+ 0FCEFAB71805D61600472CE4 /* Build configuration list for PBXNativeTarget "llvmForJSC" */ = { >+ isa = XCConfigurationList; >+ buildConfigurations = ( >+ 0FCEFAB81805D61600472CE4 /* Debug */, >+ 0FCEFAB91805D61600472CE4 /* Release */, >+ 0FCEFABA1805D61600472CE4 /* Profiling */, >+ 0FCEFABB1805D61600472CE4 /* Production */, >+ ); >+ defaultConfigurationIsVisible = 0; >+ defaultConfigurationName = Production; >+ }; > 0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */ = { > isa = XCConfigurationList; > buildConfigurations = ( >Index: Source/JavaScriptCore/dfg/DFGPlan.cpp >=================================================================== >--- Source/JavaScriptCore/dfg/DFGPlan.cpp (revision 157204) >+++ Source/JavaScriptCore/dfg/DFGPlan.cpp (working copy) >@@ -67,6 +67,7 @@ > #include "FTLLink.h" > #include "FTLLowerDFGToLLVM.h" > #include "FTLState.h" >+#include "InitializeLLVM.h" > #endif > > namespace JSC { namespace DFG { >@@ -255,8 +256,7 @@ Plan::CompilationPath Plan::compileInThr > > dumpAndVerifyGraph(dfg, "Graph just before FTL lowering:"); > >- // FIXME: Support OSR entry. >- // https://bugs.webkit.org/show_bug.cgi?id=113625 >+ initializeLLVM(); > > FTL::State state(dfg); > FTL::lowerDFGToLLVM(state); >Index: Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp >=================================================================== >--- Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp (revision 157204) >+++ Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp (working copy) >@@ -28,8 +28,9 @@ > > #if USE(LLVM_DISASSEMBLER) > >+#include "InitializeLLVM.h" >+#include "LLVMAPI.h" > #include "MacroAssemblerCodeRef.h" >-#include <wtf/LLVMHeaders.h> > > namespace JSC { > >@@ -79,6 +80,8 @@ bool tryToDisassembleWithLLVM( > const MacroAssemblerCodePtr& codePtr, size_t size, const char* prefix, PrintStream& out, > InstructionSubsetHint) > { >+ initializeLLVM(); >+ > const char* triple; > #if CPU(X86_64) > triple = "x86_64-apple-darwin"; >@@ -91,7 +94,7 @@ bool tryToDisassembleWithLLVM( > char symbolString[symbolStringSize]; > > LLVMDisasmContextRef disassemblyContext = >- LLVMCreateDisasm(triple, symbolString, 0, 0, symbolLookupCallback); >+ llvm->CreateDisasm(triple, symbolString, 0, 0, symbolLookupCallback); > RELEASE_ASSERT(disassemblyContext); > > char pcString[20]; >@@ -105,7 +108,7 @@ bool tryToDisassembleWithLLVM( > pcString, sizeof(pcString), "0x%lx", > static_cast<unsigned long>(bitwise_cast<uintptr_t>(pc))); > >- size_t instructionSize = LLVMDisasmInstruction( >+ size_t instructionSize = llvm->DisasmInstruction( > disassemblyContext, pc, end - pc, bitwise_cast<uintptr_t>(pc), > instructionString, sizeof(instructionString)); > >@@ -117,7 +120,7 @@ bool tryToDisassembleWithLLVM( > out.printf("%s%16s: %s\n", prefix, pcString, instructionString); > } > >- LLVMDisasmDispose(disassemblyContext); >+ llvm->DisasmDispose(disassemblyContext); > > return true; > } >Index: Source/JavaScriptCore/ftl/FTLAbbreviatedTypes.h >=================================================================== >--- Source/JavaScriptCore/ftl/FTLAbbreviatedTypes.h (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLAbbreviatedTypes.h (working copy) >@@ -30,7 +30,7 @@ > > #if ENABLE(FTL_JIT) > >-#include <wtf/LLVMHeaders.h> >+#include "LLVMAPI.h" > > namespace JSC { namespace FTL { > >Index: Source/JavaScriptCore/ftl/FTLAbbreviations.h >=================================================================== >--- Source/JavaScriptCore/ftl/FTLAbbreviations.h (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLAbbreviations.h (working copy) >@@ -33,6 +33,7 @@ > #include "FTLAbbreviatedTypes.h" > #include "FTLSwitchCase.h" > #include "FTLValueFromBlock.h" >+#include "LLVMAPI.h" > #include <cstring> > > namespace JSC { namespace FTL { >@@ -46,22 +47,22 @@ namespace JSC { namespace FTL { > #error "The FTL backend assumes that pointers are 64-bit." > #endif > >-static inline LType voidType(LContext context) { return LLVMVoidTypeInContext(context); } >-static inline LType int1Type(LContext context) { return LLVMInt1TypeInContext(context); } >-static inline LType int8Type(LContext context) { return LLVMInt8TypeInContext(context); } >-static inline LType int16Type(LContext context) { return LLVMInt16TypeInContext(context); } >-static inline LType int32Type(LContext context) { return LLVMInt32TypeInContext(context); } >-static inline LType int64Type(LContext context) { return LLVMInt64TypeInContext(context); } >-static inline LType intPtrType(LContext context) { return LLVMInt64TypeInContext(context); } >-static inline LType floatType(LContext context) { return LLVMFloatTypeInContext(context); } >-static inline LType doubleType(LContext context) { return LLVMDoubleTypeInContext(context); } >+static inline LType voidType(LContext context) { return llvm->VoidTypeInContext(context); } >+static inline LType int1Type(LContext context) { return llvm->Int1TypeInContext(context); } >+static inline LType int8Type(LContext context) { return llvm->Int8TypeInContext(context); } >+static inline LType int16Type(LContext context) { return llvm->Int16TypeInContext(context); } >+static inline LType int32Type(LContext context) { return llvm->Int32TypeInContext(context); } >+static inline LType int64Type(LContext context) { return llvm->Int64TypeInContext(context); } >+static inline LType intPtrType(LContext context) { return llvm->Int64TypeInContext(context); } >+static inline LType floatType(LContext context) { return llvm->FloatTypeInContext(context); } >+static inline LType doubleType(LContext context) { return llvm->DoubleTypeInContext(context); } > >-static inline LType pointerType(LType type) { return LLVMPointerType(type, 0); } >+static inline LType pointerType(LType type) { return llvm->PointerType(type, 0); } > > enum PackingMode { NotPacked, Packed }; > static inline LType structType(LContext context, LType* elementTypes, unsigned elementCount, PackingMode packing = NotPacked) > { >- return LLVMStructTypeInContext(context, elementTypes, elementCount, packing == Packed); >+ return llvm->StructTypeInContext(context, elementTypes, elementCount, packing == Packed); > } > static inline LType structType(LContext context, PackingMode packing = NotPacked) > { >@@ -80,7 +81,7 @@ static inline LType structType(LContext > enum Variadicity { NotVariadic, Variadic }; > static inline LType functionType(LType returnType, const LType* paramTypes, unsigned paramCount, Variadicity variadicity) > { >- return LLVMFunctionType(returnType, const_cast<LType*>(paramTypes), paramCount, variadicity == Variadic); >+ return llvm->FunctionType(returnType, const_cast<LType*>(paramTypes), paramCount, variadicity == Variadic); > } > template<typename VectorType> > inline LType functionType(LType returnType, const VectorType& vector, Variadicity variadicity = NotVariadic) >@@ -111,12 +112,12 @@ static inline LType functionType(LType r > return functionType(returnType, paramTypes, 4, variadicity); > } > >-static inline LType typeOf(LValue value) { return LLVMTypeOf(value); } >+static inline LType typeOf(LValue value) { return llvm->TypeOf(value); } > >-static inline unsigned mdKindID(LContext context, const char* string) { return LLVMGetMDKindIDInContext(context, string, std::strlen(string)); } >-static inline LValue mdString(LContext context, const char* string, unsigned length) { return LLVMMDStringInContext(context, string, length); } >+static inline unsigned mdKindID(LContext context, const char* string) { return llvm->GetMDKindIDInContext(context, string, std::strlen(string)); } >+static inline LValue mdString(LContext context, const char* string, unsigned length) { return llvm->MDStringInContext(context, string, length); } > static inline LValue mdString(LContext context, const char* string) { return mdString(context, string, std::strlen(string)); } >-static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return LLVMMDNodeInContext(context, args, numArgs); } >+static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return llvm->MDNodeInContext(context, args, numArgs); } > static inline LValue mdNode(LContext context) { return mdNode(context, 0, 0); } > static inline LValue mdNode(LContext context, LValue arg1) { return mdNode(context, &arg1, 1); } > static inline LValue mdNode(LContext context, LValue arg1, LValue arg2) >@@ -125,11 +126,11 @@ static inline LValue mdNode(LContext con > return mdNode(context, args, 2); > } > >-static inline void setMetadata(LValue instruction, unsigned kind, LValue metadata) { LLVMSetMetadata(instruction, kind, metadata); } >+static inline void setMetadata(LValue instruction, unsigned kind, LValue metadata) { llvm->SetMetadata(instruction, kind, metadata); } > >-static inline LValue addFunction(LModule module, const char* name, LType type) { return LLVMAddFunction(module, name, type); } >-static inline void setLinkage(LValue global, LLinkage linkage) { LLVMSetLinkage(global, linkage); } >-static inline void setFunctionCallingConv(LValue function, LCallConv convention) { LLVMSetFunctionCallConv(function, convention); } >+static inline LValue addFunction(LModule module, const char* name, LType type) { return llvm->AddFunction(module, name, type); } >+static inline void setLinkage(LValue global, LLinkage linkage) { llvm->SetLinkage(global, linkage); } >+static inline void setFunctionCallingConv(LValue function, LCallConv convention) { llvm->SetFunctionCallConv(function, convention); } > > static inline LValue addExternFunction(LModule module, const char* name, LType type) > { >@@ -138,21 +139,21 @@ static inline LValue addExternFunction(L > return result; > } > >-static inline LValue getParam(LValue function, unsigned index) { return LLVMGetParam(function, index); } >+static inline LValue getParam(LValue function, unsigned index) { return llvm->GetParam(function, index); } > > enum BitExtension { ZeroExtend, SignExtend }; >-static inline LValue constInt(LType type, unsigned long long value, BitExtension extension = ZeroExtend) { return LLVMConstInt(type, value, extension == SignExtend); } >-static inline LValue constReal(LType type, double value) { return LLVMConstReal(type, value); } >-static inline LValue constIntToPtr(LValue value, LType type) { return LLVMConstIntToPtr(value, type); } >-static inline LValue constBitCast(LValue value, LType type) { return LLVMConstBitCast(value, type); } >+static inline LValue constInt(LType type, unsigned long long value, BitExtension extension = ZeroExtend) { return llvm->ConstInt(type, value, extension == SignExtend); } >+static inline LValue constReal(LType type, double value) { return llvm->ConstReal(type, value); } >+static inline LValue constIntToPtr(LValue value, LType type) { return llvm->ConstIntToPtr(value, type); } >+static inline LValue constBitCast(LValue value, LType type) { return llvm->ConstBitCast(value, type); } > >-static inline LBasicBlock appendBasicBlock(LContext context, LValue function, const char* name = "") { return LLVMAppendBasicBlockInContext(context, function, name); } >-static inline LBasicBlock insertBasicBlock(LContext context, LBasicBlock beforeBasicBlock, const char* name = "") { return LLVMInsertBasicBlockInContext(context, beforeBasicBlock, name); } >+static inline LBasicBlock appendBasicBlock(LContext context, LValue function, const char* name = "") { return llvm->AppendBasicBlockInContext(context, function, name); } >+static inline LBasicBlock insertBasicBlock(LContext context, LBasicBlock beforeBasicBlock, const char* name = "") { return llvm->InsertBasicBlockInContext(context, beforeBasicBlock, name); } > >-static inline LValue buildPhi(LBuilder builder, LType type) { return LLVMBuildPhi(builder, type, ""); } >+static inline LValue buildPhi(LBuilder builder, LType type) { return llvm->BuildPhi(builder, type, ""); } > static inline void addIncoming(LValue phi, const LValue* values, const LBasicBlock* blocks, unsigned numPredecessors) > { >- LLVMAddIncoming(phi, const_cast<LValue*>(values), const_cast<LBasicBlock*>(blocks), numPredecessors); >+ llvm->AddIncoming(phi, const_cast<LValue*>(values), const_cast<LBasicBlock*>(blocks), numPredecessors); > } > static inline void addIncoming(LValue phi, ValueFromBlock value1) > { >@@ -180,44 +181,44 @@ static inline LValue buildPhi( > return result; > } > >-static inline LValue buildAlloca(LBuilder builder, LType type) { return LLVMBuildAlloca(builder, type, ""); } >-static inline LValue buildAdd(LBuilder builder, LValue left, LValue right) { return LLVMBuildAdd(builder, left, right, ""); } >-static inline LValue buildSub(LBuilder builder, LValue left, LValue right) { return LLVMBuildSub(builder, left, right, ""); } >-static inline LValue buildMul(LBuilder builder, LValue left, LValue right) { return LLVMBuildMul(builder, left, right, ""); } >-static inline LValue buildDiv(LBuilder builder, LValue left, LValue right) { return LLVMBuildSDiv(builder, left, right, ""); } >-static inline LValue buildRem(LBuilder builder, LValue left, LValue right) { return LLVMBuildSRem(builder, left, right, ""); } >-static inline LValue buildNeg(LBuilder builder, LValue value) { return LLVMBuildNeg(builder, value, ""); } >-static inline LValue buildFAdd(LBuilder builder, LValue left, LValue right) { return LLVMBuildFAdd(builder, left, right, ""); } >-static inline LValue buildFSub(LBuilder builder, LValue left, LValue right) { return LLVMBuildFSub(builder, left, right, ""); } >-static inline LValue buildFMul(LBuilder builder, LValue left, LValue right) { return LLVMBuildFMul(builder, left, right, ""); } >-static inline LValue buildFDiv(LBuilder builder, LValue left, LValue right) { return LLVMBuildFDiv(builder, left, right, ""); } >-static inline LValue buildFRem(LBuilder builder, LValue left, LValue right) { return LLVMBuildFRem(builder, left, right, ""); } >-static inline LValue buildFNeg(LBuilder builder, LValue value) { return LLVMBuildFNeg(builder, value, ""); } >-static inline LValue buildAnd(LBuilder builder, LValue left, LValue right) { return LLVMBuildAnd(builder, left, right, ""); } >-static inline LValue buildOr(LBuilder builder, LValue left, LValue right) { return LLVMBuildOr(builder, left, right, ""); } >-static inline LValue buildXor(LBuilder builder, LValue left, LValue right) { return LLVMBuildXor(builder, left, right, ""); } >-static inline LValue buildShl(LBuilder builder, LValue left, LValue right) { return LLVMBuildShl(builder, left, right, ""); } >-static inline LValue buildAShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildAShr(builder, left, right, ""); } >-static inline LValue buildLShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildLShr(builder, left, right, ""); } >-static inline LValue buildNot(LBuilder builder, LValue value) { return LLVMBuildNot(builder, value, ""); } >-static inline LValue buildLoad(LBuilder builder, LValue pointer) { return LLVMBuildLoad(builder, pointer, ""); } >-static inline LValue buildStore(LBuilder builder, LValue value, LValue pointer) { return LLVMBuildStore(builder, value, pointer); } >-static inline LValue buildSExt(LBuilder builder, LValue value, LType type) { return LLVMBuildSExt(builder, value, type, ""); } >-static inline LValue buildZExt(LBuilder builder, LValue value, LType type) { return LLVMBuildZExt(builder, value, type, ""); } >-static inline LValue buildFPToSI(LBuilder builder, LValue value, LType type) { return LLVMBuildFPToSI(builder, value, type, ""); } >-static inline LValue buildFPToUI(LBuilder builder, LValue value, LType type) { return LLVMBuildFPToUI(builder, value, type, ""); } >-static inline LValue buildSIToFP(LBuilder builder, LValue value, LType type) { return LLVMBuildSIToFP(builder, value, type, ""); } >-static inline LValue buildUIToFP(LBuilder builder, LValue value, LType type) { return LLVMBuildUIToFP(builder, value, type, ""); } >-static inline LValue buildIntCast(LBuilder builder, LValue value, LType type) { return LLVMBuildIntCast(builder, value, type, ""); } >-static inline LValue buildFPCast(LBuilder builder, LValue value, LType type) { return LLVMBuildFPCast(builder, value, type, ""); } >-static inline LValue buildIntToPtr(LBuilder builder, LValue value, LType type) { return LLVMBuildIntToPtr(builder, value, type, ""); } >-static inline LValue buildPtrToInt(LBuilder builder, LValue value, LType type) { return LLVMBuildPtrToInt(builder, value, type, ""); } >-static inline LValue buildBitCast(LBuilder builder, LValue value, LType type) { return LLVMBuildBitCast(builder, value, type, ""); } >-static inline LValue buildICmp(LBuilder builder, LIntPredicate cond, LValue left, LValue right) { return LLVMBuildICmp(builder, cond, left, right, ""); } >-static inline LValue buildFCmp(LBuilder builder, LRealPredicate cond, LValue left, LValue right) { return LLVMBuildFCmp(builder, cond, left, right, ""); } >+static inline LValue buildAlloca(LBuilder builder, LType type) { return llvm->BuildAlloca(builder, type, ""); } >+static inline LValue buildAdd(LBuilder builder, LValue left, LValue right) { return llvm->BuildAdd(builder, left, right, ""); } >+static inline LValue buildSub(LBuilder builder, LValue left, LValue right) { return llvm->BuildSub(builder, left, right, ""); } >+static inline LValue buildMul(LBuilder builder, LValue left, LValue right) { return llvm->BuildMul(builder, left, right, ""); } >+static inline LValue buildDiv(LBuilder builder, LValue left, LValue right) { return llvm->BuildSDiv(builder, left, right, ""); } >+static inline LValue buildRem(LBuilder builder, LValue left, LValue right) { return llvm->BuildSRem(builder, left, right, ""); } >+static inline LValue buildNeg(LBuilder builder, LValue value) { return llvm->BuildNeg(builder, value, ""); } >+static inline LValue buildFAdd(LBuilder builder, LValue left, LValue right) { return llvm->BuildFAdd(builder, left, right, ""); } >+static inline LValue buildFSub(LBuilder builder, LValue left, LValue right) { return llvm->BuildFSub(builder, left, right, ""); } >+static inline LValue buildFMul(LBuilder builder, LValue left, LValue right) { return llvm->BuildFMul(builder, left, right, ""); } >+static inline LValue buildFDiv(LBuilder builder, LValue left, LValue right) { return llvm->BuildFDiv(builder, left, right, ""); } >+static inline LValue buildFRem(LBuilder builder, LValue left, LValue right) { return llvm->BuildFRem(builder, left, right, ""); } >+static inline LValue buildFNeg(LBuilder builder, LValue value) { return llvm->BuildFNeg(builder, value, ""); } >+static inline LValue buildAnd(LBuilder builder, LValue left, LValue right) { return llvm->BuildAnd(builder, left, right, ""); } >+static inline LValue buildOr(LBuilder builder, LValue left, LValue right) { return llvm->BuildOr(builder, left, right, ""); } >+static inline LValue buildXor(LBuilder builder, LValue left, LValue right) { return llvm->BuildXor(builder, left, right, ""); } >+static inline LValue buildShl(LBuilder builder, LValue left, LValue right) { return llvm->BuildShl(builder, left, right, ""); } >+static inline LValue buildAShr(LBuilder builder, LValue left, LValue right) { return llvm->BuildAShr(builder, left, right, ""); } >+static inline LValue buildLShr(LBuilder builder, LValue left, LValue right) { return llvm->BuildLShr(builder, left, right, ""); } >+static inline LValue buildNot(LBuilder builder, LValue value) { return llvm->BuildNot(builder, value, ""); } >+static inline LValue buildLoad(LBuilder builder, LValue pointer) { return llvm->BuildLoad(builder, pointer, ""); } >+static inline LValue buildStore(LBuilder builder, LValue value, LValue pointer) { return llvm->BuildStore(builder, value, pointer); } >+static inline LValue buildSExt(LBuilder builder, LValue value, LType type) { return llvm->BuildSExt(builder, value, type, ""); } >+static inline LValue buildZExt(LBuilder builder, LValue value, LType type) { return llvm->BuildZExt(builder, value, type, ""); } >+static inline LValue buildFPToSI(LBuilder builder, LValue value, LType type) { return llvm->BuildFPToSI(builder, value, type, ""); } >+static inline LValue buildFPToUI(LBuilder builder, LValue value, LType type) { return llvm->BuildFPToUI(builder, value, type, ""); } >+static inline LValue buildSIToFP(LBuilder builder, LValue value, LType type) { return llvm->BuildSIToFP(builder, value, type, ""); } >+static inline LValue buildUIToFP(LBuilder builder, LValue value, LType type) { return llvm->BuildUIToFP(builder, value, type, ""); } >+static inline LValue buildIntCast(LBuilder builder, LValue value, LType type) { return llvm->BuildIntCast(builder, value, type, ""); } >+static inline LValue buildFPCast(LBuilder builder, LValue value, LType type) { return llvm->BuildFPCast(builder, value, type, ""); } >+static inline LValue buildIntToPtr(LBuilder builder, LValue value, LType type) { return llvm->BuildIntToPtr(builder, value, type, ""); } >+static inline LValue buildPtrToInt(LBuilder builder, LValue value, LType type) { return llvm->BuildPtrToInt(builder, value, type, ""); } >+static inline LValue buildBitCast(LBuilder builder, LValue value, LType type) { return llvm->BuildBitCast(builder, value, type, ""); } >+static inline LValue buildICmp(LBuilder builder, LIntPredicate cond, LValue left, LValue right) { return llvm->BuildICmp(builder, cond, left, right, ""); } >+static inline LValue buildFCmp(LBuilder builder, LRealPredicate cond, LValue left, LValue right) { return llvm->BuildFCmp(builder, cond, left, right, ""); } > static inline LValue buildCall(LBuilder builder, LValue function, const LValue* args, unsigned numArgs) > { >- return LLVMBuildCall(builder, function, const_cast<LValue*>(args), numArgs, ""); >+ return llvm->BuildCall(builder, function, const_cast<LValue*>(args), numArgs, ""); > } > template<typename VectorType> > inline LValue buildCall(LBuilder builder, LValue function, const VectorType& vector) >@@ -248,13 +249,13 @@ static inline LValue buildCall(LBuilder > return buildCall(builder, function, args, 4); > } > enum TailCallMode { IsNotTailCall, IsTailCall }; >-static inline void setTailCall(LValue call, TailCallMode mode) { LLVMSetTailCall(call, mode == IsTailCall); } >-static inline LValue buildExtractValue(LBuilder builder, LValue aggVal, unsigned index) { return LLVMBuildExtractValue(builder, aggVal, index, ""); } >-static inline LValue buildSelect(LBuilder builder, LValue condition, LValue taken, LValue notTaken) { return LLVMBuildSelect(builder, condition, taken, notTaken, ""); } >-static inline LValue buildBr(LBuilder builder, LBasicBlock destination) { return LLVMBuildBr(builder, destination); } >-static inline LValue buildCondBr(LBuilder builder, LValue condition, LBasicBlock taken, LBasicBlock notTaken) { return LLVMBuildCondBr(builder, condition, taken, notTaken); } >-static inline LValue buildSwitch(LBuilder builder, LValue value, LBasicBlock fallThrough, unsigned numCases) { return LLVMBuildSwitch(builder, value, fallThrough, numCases); } >-static inline void addCase(LValue switchInst, LValue value, LBasicBlock target) { LLVMAddCase(switchInst, value, target); } >+static inline void setTailCall(LValue call, TailCallMode mode) { llvm->SetTailCall(call, mode == IsTailCall); } >+static inline LValue buildExtractValue(LBuilder builder, LValue aggVal, unsigned index) { return llvm->BuildExtractValue(builder, aggVal, index, ""); } >+static inline LValue buildSelect(LBuilder builder, LValue condition, LValue taken, LValue notTaken) { return llvm->BuildSelect(builder, condition, taken, notTaken, ""); } >+static inline LValue buildBr(LBuilder builder, LBasicBlock destination) { return llvm->BuildBr(builder, destination); } >+static inline LValue buildCondBr(LBuilder builder, LValue condition, LBasicBlock taken, LBasicBlock notTaken) { return llvm->BuildCondBr(builder, condition, taken, notTaken); } >+static inline LValue buildSwitch(LBuilder builder, LValue value, LBasicBlock fallThrough, unsigned numCases) { return llvm->BuildSwitch(builder, value, fallThrough, numCases); } >+static inline void addCase(LValue switchInst, LValue value, LBasicBlock target) { llvm->AddCase(switchInst, value, target); } > template<typename VectorType> > static inline LValue buildSwitch(LBuilder builder, LValue value, const VectorType& cases, LBasicBlock fallThrough) > { >@@ -263,15 +264,15 @@ static inline LValue buildSwitch(LBuilde > addCase(result, cases[i].value(), cases[i].target()); > return result; > } >-static inline LValue buildRet(LBuilder builder, LValue value) { return LLVMBuildRet(builder, value); } >-static inline LValue buildUnreachable(LBuilder builder) { return LLVMBuildUnreachable(builder); } >+static inline LValue buildRet(LBuilder builder, LValue value) { return llvm->BuildRet(builder, value); } >+static inline LValue buildUnreachable(LBuilder builder) { return llvm->BuildUnreachable(builder); } > >-static inline void dumpModule(LModule module) { LLVMDumpModule(module); } >+static inline void dumpModule(LModule module) { llvm->DumpModule(module); } > static inline void verifyModule(LModule module) > { > char* error = 0; >- LLVMVerifyModule(module, LLVMAbortProcessAction, &error); >- LLVMDisposeMessage(error); >+ llvm->VerifyModule(module, LLVMAbortProcessAction, &error); >+ llvm->DisposeMessage(error); > } > > } } // namespace JSC::FTL >Index: Source/JavaScriptCore/ftl/FTLCompile.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLCompile.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLCompile.cpp (working copy) >@@ -34,8 +34,8 @@ > #include "Disassembler.h" > #include "FTLJITCode.h" > #include "JITStubs.h" >+#include "LLVMAPI.h" > #include "LinkBuffer.h" >-#include <wtf/LLVMHeaders.h> > > namespace JSC { namespace FTL { > >@@ -95,52 +95,52 @@ void compile(State& state) > char* error = 0; > > LLVMMCJITCompilerOptions options; >- LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); >+ llvm->InitializeMCJITCompilerOptions(&options, sizeof(options)); > options.OptLevel = Options::llvmBackendOptimizationLevel(); > options.NoFramePointerElim = true; > if (Options::useLLVMSmallCodeModel()) > options.CodeModel = LLVMCodeModelSmall; > options.EnableFastISel = Options::enableLLVMFastISel(); >- options.MCJMM = LLVMCreateSimpleMCJITMemoryManager( >+ options.MCJMM = llvm->CreateSimpleMCJITMemoryManager( > &state, mmAllocateCodeSection, mmAllocateDataSection, mmApplyPermissions, mmDestroy); > > LLVMExecutionEngineRef engine; > >- if (LLVMCreateMCJITCompilerForModule(&engine, state.module, &options, sizeof(options), &error)) { >+ if (llvm->CreateMCJITCompilerForModule(&engine, state.module, &options, sizeof(options), &error)) { > dataLog("FATAL: Could not create LLVM execution engine: ", error, "\n"); > CRASH(); > } > >- LLVMPassManagerBuilderRef passBuilder = LLVMPassManagerBuilderCreate(); >- LLVMPassManagerBuilderSetOptLevel(passBuilder, Options::llvmOptimizationLevel()); >- LLVMPassManagerBuilderSetSizeLevel(passBuilder, Options::llvmSizeLevel()); >+ LLVMPassManagerBuilderRef passBuilder = llvm->PassManagerBuilderCreate(); >+ llvm->PassManagerBuilderSetOptLevel(passBuilder, Options::llvmOptimizationLevel()); >+ llvm->PassManagerBuilderSetSizeLevel(passBuilder, Options::llvmSizeLevel()); > >- LLVMPassManagerRef functionPasses = LLVMCreateFunctionPassManagerForModule(state.module); >- LLVMPassManagerRef modulePasses = LLVMCreatePassManager(); >+ LLVMPassManagerRef functionPasses = llvm->CreateFunctionPassManagerForModule(state.module); >+ LLVMPassManagerRef modulePasses = llvm->CreatePassManager(); > >- LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), modulePasses); >+ llvm->AddTargetData(llvm->GetExecutionEngineTargetData(engine), modulePasses); > >- LLVMPassManagerBuilderPopulateFunctionPassManager(passBuilder, functionPasses); >- LLVMPassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses); >+ llvm->PassManagerBuilderPopulateFunctionPassManager(passBuilder, functionPasses); >+ llvm->PassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses); > >- LLVMPassManagerBuilderDispose(passBuilder); >+ llvm->PassManagerBuilderDispose(passBuilder); > >- LLVMInitializeFunctionPassManager(functionPasses); >- for (LValue function = LLVMGetFirstFunction(state.module); function; function = LLVMGetNextFunction(function)) >- LLVMRunFunctionPassManager(functionPasses, function); >- LLVMFinalizeFunctionPassManager(functionPasses); >+ llvm->InitializeFunctionPassManager(functionPasses); >+ for (LValue function = llvm->GetFirstFunction(state.module); function; function = llvm->GetNextFunction(function)) >+ llvm->RunFunctionPassManager(functionPasses, function); >+ llvm->FinalizeFunctionPassManager(functionPasses); > >- LLVMRunPassManager(modulePasses, state.module); >+ llvm->RunPassManager(modulePasses, state.module); > > if (DFG::shouldShowDisassembly() || DFG::verboseCompilationEnabled()) > state.dumpState("after optimization"); > > // FIXME: Need to add support for the case where JIT memory allocation failed. > // https://bugs.webkit.org/show_bug.cgi?id=113620 >- state.generatedFunction = reinterpret_cast<GeneratedFunction>(LLVMGetPointerToGlobal(engine, state.function)); >- LLVMDisposePassManager(functionPasses); >- LLVMDisposePassManager(modulePasses); >- LLVMDisposeExecutionEngine(engine); >+ state.generatedFunction = reinterpret_cast<GeneratedFunction>(llvm->GetPointerToGlobal(engine, state.function)); >+ llvm->DisposePassManager(functionPasses); >+ llvm->DisposePassManager(modulePasses); >+ llvm->DisposeExecutionEngine(engine); > > if (shouldShowDisassembly()) { > // FIXME: fourthTier: FTL memory allocator should be able to tell us which of >Index: Source/JavaScriptCore/ftl/FTLFail.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLFail.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLFail.cpp (working copy) >@@ -30,7 +30,7 @@ > > #include "DFGFailedFinalizer.h" > #include "FTLJITCode.h" >-#include <wtf/LLVMHeaders.h> >+#include "LLVMAPI.h" > > namespace JSC { namespace FTL { > >@@ -40,7 +40,7 @@ void fail(State& state) > { > state.graph.m_plan.finalizer = adoptPtr(new FailedFinalizer(state.graph.m_plan)); > >- LLVMDisposeModule(state.module); >+ llvm->DisposeModule(state.module); > } > > } } // namespace JSC::FTL >Index: Source/JavaScriptCore/ftl/FTLJITCode.h >=================================================================== >--- Source/JavaScriptCore/ftl/FTLJITCode.h (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLJITCode.h (working copy) >@@ -33,7 +33,7 @@ > #include "DFGCommonData.h" > #include "FTLOSRExit.h" > #include "JITCode.h" >-#include <wtf/LLVMHeaders.h> >+#include "LLVMAPI.h" > #include <wtf/RefCountedArray.h> > > namespace JSC { namespace FTL { >Index: Source/JavaScriptCore/ftl/FTLJITFinalizer.h >=================================================================== >--- Source/JavaScriptCore/ftl/FTLJITFinalizer.h (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLJITFinalizer.h (working copy) >@@ -33,9 +33,9 @@ > #include "DFGFinalizer.h" > #include "FTLGeneratedFunction.h" > #include "FTLJITCode.h" >+#include "LLVMAPI.h" > #include "LinkBuffer.h" > #include "MacroAssembler.h" >-#include <wtf/LLVMHeaders.h> > > namespace JSC { namespace FTL { > >Index: Source/JavaScriptCore/ftl/FTLLink.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLLink.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLLink.cpp (working copy) >@@ -35,9 +35,9 @@ > #include "FTLJITCode.h" > #include "JITOperations.h" > #include "JITStubs.h" >+#include "LLVMAPI.h" > #include "LinkBuffer.h" > #include "VirtualRegister.h" >-#include <wtf/LLVMHeaders.h> > > namespace JSC { namespace FTL { > >Index: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (working copy) >@@ -91,7 +91,7 @@ public: > m_graph.m_dominators.computeIfNecessary(m_graph); > > m_ftlState.module = >- LLVMModuleCreateWithNameInContext(name.data(), m_ftlState.context); >+ llvm->ModuleCreateWithNameInContext(name.data(), m_ftlState.context); > > m_ftlState.function = addFunction( > m_ftlState.module, name.data(), functionType(m_out.int64, m_out.intPtr)); >Index: Source/JavaScriptCore/ftl/FTLOutput.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLOutput.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLOutput.cpp (working copy) >@@ -34,7 +34,7 @@ Output::Output(LContext context) > : IntrinsicRepository(context) > , m_function(0) > , m_heaps(0) >- , m_builder(LLVMCreateBuilderInContext(m_context)) >+ , m_builder(llvm->CreateBuilderInContext(m_context)) > , m_block(0) > , m_nextBlock(0) > { >@@ -42,7 +42,7 @@ Output::Output(LContext context) > > Output::~Output() > { >- LLVMDisposeBuilder(m_builder); >+ llvm->DisposeBuilder(m_builder); > } > > } } // namespace JSC::FTL >Index: Source/JavaScriptCore/ftl/FTLOutput.h >=================================================================== >--- Source/JavaScriptCore/ftl/FTLOutput.h (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLOutput.h (working copy) >@@ -94,7 +94,7 @@ public: > { > m_block = block; > >- LLVMPositionBuilderAtEnd(m_builder, block); >+ llvm->PositionBuilderAtEnd(m_builder, block); > } > LBasicBlock newBlock(const char* name = "") > { >Index: Source/JavaScriptCore/ftl/FTLState.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLState.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/FTLState.cpp (working copy) >@@ -39,7 +39,7 @@ using namespace DFG; > > State::State(Graph& graph) > : graph(graph) >- , context(LLVMContextCreate()) >+ , context(llvm->ContextCreate()) > , module(0) > , function(0) > , generatedFunction(0) >@@ -67,7 +67,7 @@ State::State(Graph& graph) > > State::~State() > { >- LLVMContextDispose(context); >+ llvm->ContextDispose(context); > } > > void State::dumpState(const char* when) >Index: Source/JavaScriptCore/ftl/WebKitLLVMLibraryAnchor.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/WebKitLLVMLibraryAnchor.cpp (revision 157204) >+++ Source/JavaScriptCore/ftl/WebKitLLVMLibraryAnchor.cpp (working copy) >@@ -1,34 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >- >-#if ENABLE(FTL_JIT) >-// This is a hack for ensuring that the build system relinks JavaScriptCore if any >-// of the LLVM libraries are known to have changed. >-#include "WebKitLLVMLibraryToken.h" >- >-#endif >- >Index: Source/JavaScriptCore/llvm/InitializeLLVM.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/InitializeLLVM.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/InitializeLLVM.cpp (working copy) >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "InitializeLLVM.h" >+ >+#if HAVE(LLVM) >+ >+#include <wtf/Threading.h> >+ >+namespace JSC { >+ >+static pthread_once_t initializeLLVMOnceKey = PTHREAD_ONCE_INIT; >+ >+void initializeLLVM() >+{ >+ pthread_once(&initializeLLVMOnceKey, initializeLLVMImpl); >+} >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >+ >Index: Source/JavaScriptCore/llvm/InitializeLLVM.h >=================================================================== >--- Source/JavaScriptCore/llvm/InitializeLLVM.h (revision 0) >+++ Source/JavaScriptCore/llvm/InitializeLLVM.h (working copy) >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef InitializeLLVM_h >+#define InitializeLLVM_h >+ >+#include <wtf/Platform.h> >+ >+#if HAVE(LLVM) >+ >+namespace JSC { >+ >+void initializeLLVMImpl(); >+ >+void initializeLLVM(); // It's safe to call this multiple times. >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >+ >+#endif // InitializeLLVM_h >+ >Index: Source/JavaScriptCore/llvm/InitializeLLVMMac.mm >=================================================================== >--- Source/JavaScriptCore/llvm/InitializeLLVMMac.mm (revision 0) >+++ Source/JavaScriptCore/llvm/InitializeLLVMMac.mm (working copy) >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "InitializeLLVM.h" >+ >+#if HAVE(LLVM) >+ >+#import "InitializeLLVMPOSIX.h" >+#import <Foundation/Foundation.h> >+ >+// Use the "JS" prefix to make check-for-inappropriate-objc-class-names happy. I >+// think this is better than hacking that script. >+ >+@interface JSJavaScriptCoreBundleFinder : NSObject >+@end >+ >+@implementation JSJavaScriptCoreBundleFinder >+@end >+ >+namespace JSC { >+ >+void initializeLLVMImpl() >+{ >+ NSBundle *myBundle = [NSBundle bundleForClass:[JSJavaScriptCoreBundleFinder class]]; >+ NSString *path = [[myBundle bundlePath] stringByAppendingPathComponent:@"Libraries/libllvmForJSC.dylib"]; >+ >+ initializeLLVMPOSIX([path UTF8String]); >+} >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >Index: Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp (working copy) >@@ -0,0 +1,53 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "InitializeLLVMPOSIX.h" >+ >+#if HAVE(LLVM) >+ >+#include "LLVMAPI.h" >+#include <dlfcn.h> >+ >+namespace JSC { >+ >+typedef LLVMAPI* (*InitializerFunction)(); >+ >+void initializeLLVMPOSIX(const char* libraryName) >+{ >+ void* library = dlopen(libraryName, RTLD_NOW); >+ ASSERT_WITH_MESSAGE(library, "%s", dlerror()); >+ >+ InitializerFunction initializer = bitwise_cast<InitializerFunction>( >+ dlsym(library, "initializeAndGetJSCLLVMAPI")); >+ ASSERT_WITH_MESSAGE(initializer, "%s", dlerror()); >+ >+ llvm = initializer(); >+} >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >+ >Index: Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.h >=================================================================== >--- Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.h (revision 0) >+++ Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.h (working copy) >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef InitializeLLVMPOSIX_h >+#define InitializeLLVMPOSIX_h >+ >+#include <wtf/Platform.h> >+ >+#if HAVE(LLVM) >+ >+namespace JSC { >+ >+void initializeLLVMPOSIX(const char* libraryName); >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >+ >+#endif // InitializeLLVMPOSIX_h >+ >Index: Source/JavaScriptCore/llvm/LLVMAPI.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/LLVMAPI.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/LLVMAPI.cpp (working copy) >@@ -0,0 +1,37 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "LLVMAPI.h" >+ >+#if HAVE(LLVM) >+ >+namespace JSC { >+ >+LLVMAPI* llvm; >+ >+} >+ >+#endif // HAVE(LLVM) >Index: Source/JavaScriptCore/llvm/LLVMAPI.h >=================================================================== >--- Source/JavaScriptCore/llvm/LLVMAPI.h (revision 0) >+++ Source/JavaScriptCore/llvm/LLVMAPI.h (working copy) >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef LLVMAPI_h >+#define LLVMAPI_h >+ >+#include <wtf/Platform.h> >+ >+#if HAVE(LLVM) >+ >+#include "LLVMAPIFunctions.h" >+#include "LLVMHeaders.h" >+ >+namespace JSC { >+ >+struct LLVMAPI { >+#define LLVM_API_FUNCTION_DECLARATION(returnType, name, signature) \ >+ returnType (*name) signature; >+ FOR_EACH_LLVM_API_FUNCTION(LLVM_API_FUNCTION_DECLARATION) >+#undef LLVM_API_FUNCTION_DECLARATION >+}; >+ >+extern LLVMAPI* llvm; >+ >+} // namespace JSC >+ >+#endif // HAVE(LLVM) >+ >+#endif // LLVMAPI_h >+ >Index: Source/JavaScriptCore/llvm/LLVMAPIFunctions.h >=================================================================== >--- Source/JavaScriptCore/llvm/LLVMAPIFunctions.h (revision 0) >+++ Source/JavaScriptCore/llvm/LLVMAPIFunctions.h (working copy) >@@ -0,0 +1,636 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef LLVMAPIFunctions_h >+#define LLVMAPIFunctions_h >+ >+#include "LLVMHeaders.h" >+ >+#define FOR_EACH_LLVM_API_FUNCTION(macro) \ >+ macro(void, InitializeCore, (LLVMPassRegistryRef R)) \ >+ macro(void, Shutdown, ()) \ >+ macro(char *, CreateMessage, (const char *Message)) \ >+ macro(void, DisposeMessage, (char *Message)) \ >+ macro(LLVMContextRef, ContextCreate, (void)) \ >+ macro(LLVMContextRef, GetGlobalContext, (void)) \ >+ macro(void, ContextDispose, (LLVMContextRef C)) \ >+ macro(unsigned, GetMDKindIDInContext, (LLVMContextRef C, const char* Name, unsigned SLen)) \ >+ macro(unsigned, GetMDKindID, (const char* Name, unsigned SLen)) \ >+ macro(LLVMModuleRef, ModuleCreateWithName, (const char *ModuleID)) \ >+ macro(LLVMModuleRef, ModuleCreateWithNameInContext, (const char *ModuleID, LLVMContextRef C)) \ >+ macro(void, DisposeModule, (LLVMModuleRef M)) \ >+ macro(const char *, GetDataLayout, (LLVMModuleRef M)) \ >+ macro(void, SetDataLayout, (LLVMModuleRef M, const char *Triple)) \ >+ macro(const char *, GetTarget, (LLVMModuleRef M)) \ >+ macro(void, SetTarget, (LLVMModuleRef M, const char *Triple)) \ >+ macro(void, DumpModule, (LLVMModuleRef M)) \ >+ macro(LLVMBool, PrintModuleToFile, (LLVMModuleRef M, const char *Filename, char **ErrorMessage)) \ >+ macro(void, SetModuleInlineAsm, (LLVMModuleRef M, const char *Asm)) \ >+ macro(LLVMContextRef, GetModuleContext, (LLVMModuleRef M)) \ >+ macro(LLVMTypeRef, GetTypeByName, (LLVMModuleRef M, const char *Name)) \ >+ macro(unsigned, GetNamedMetadataNumOperands, (LLVMModuleRef M, const char* name)) \ >+ macro(void, GetNamedMetadataOperands, (LLVMModuleRef M, const char* name, LLVMValueRef *Dest)) \ >+ macro(void, AddNamedMetadataOperand, (LLVMModuleRef M, const char* name, LLVMValueRef Val)) \ >+ macro(LLVMValueRef, AddFunction, (LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)) \ >+ macro(LLVMValueRef, GetNamedFunction, (LLVMModuleRef M, const char *Name)) \ >+ macro(LLVMValueRef, GetFirstFunction, (LLVMModuleRef M)) \ >+ macro(LLVMValueRef, GetLastFunction, (LLVMModuleRef M)) \ >+ macro(LLVMValueRef, GetNextFunction, (LLVMValueRef Fn)) \ >+ macro(LLVMValueRef, GetPreviousFunction, (LLVMValueRef Fn)) \ >+ macro(LLVMTypeKind, GetTypeKind, (LLVMTypeRef Ty)) \ >+ macro(LLVMBool, TypeIsSized, (LLVMTypeRef Ty)) \ >+ macro(LLVMContextRef, GetTypeContext, (LLVMTypeRef Ty)) \ >+ macro(LLVMTypeRef, Int1TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, Int8TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, Int16TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, Int32TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, Int64TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, IntTypeInContext, (LLVMContextRef C, unsigned NumBits)) \ >+ macro(LLVMTypeRef, Int1Type, (void)) \ >+ macro(LLVMTypeRef, Int8Type, (void)) \ >+ macro(LLVMTypeRef, Int16Type, (void)) \ >+ macro(LLVMTypeRef, Int32Type, (void)) \ >+ macro(LLVMTypeRef, Int64Type, (void)) \ >+ macro(LLVMTypeRef, IntType, (unsigned NumBits)) \ >+ macro(unsigned, GetIntTypeWidth, (LLVMTypeRef IntegerTy)) \ >+ macro(LLVMTypeRef, HalfTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, FloatTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, DoubleTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, X86FP80TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, FP128TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, PPCFP128TypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, HalfType, (void)) \ >+ macro(LLVMTypeRef, FloatType, (void)) \ >+ macro(LLVMTypeRef, DoubleType, (void)) \ >+ macro(LLVMTypeRef, X86FP80Type, (void)) \ >+ macro(LLVMTypeRef, FP128Type, (void)) \ >+ macro(LLVMTypeRef, PPCFP128Type, (void)) \ >+ macro(LLVMTypeRef, FunctionType, (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)) \ >+ macro(LLVMBool, IsFunctionVarArg, (LLVMTypeRef FunctionTy)) \ >+ macro(LLVMTypeRef, GetReturnType, (LLVMTypeRef FunctionTy)) \ >+ macro(unsigned, CountParamTypes, (LLVMTypeRef FunctionTy)) \ >+ macro(void, GetParamTypes, (LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)) \ >+ macro(LLVMTypeRef, StructTypeInContext, (LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \ >+ macro(LLVMTypeRef, StructType, (LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \ >+ macro(LLVMTypeRef, StructCreateNamed, (LLVMContextRef C, const char *Name)) \ >+ macro(const char *, GetStructName, (LLVMTypeRef Ty)) \ >+ macro(void, StructSetBody, (LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \ >+ macro(unsigned, CountStructElementTypes, (LLVMTypeRef StructTy)) \ >+ macro(void, GetStructElementTypes, (LLVMTypeRef StructTy, LLVMTypeRef *Dest)) \ >+ macro(LLVMBool, IsPackedStruct, (LLVMTypeRef StructTy)) \ >+ macro(LLVMBool, IsOpaqueStruct, (LLVMTypeRef StructTy)) \ >+ macro(LLVMTypeRef, GetElementType, (LLVMTypeRef Ty)) \ >+ macro(LLVMTypeRef, ArrayType, (LLVMTypeRef ElementType, unsigned ElementCount)) \ >+ macro(unsigned, GetArrayLength, (LLVMTypeRef ArrayTy)) \ >+ macro(LLVMTypeRef, PointerType, (LLVMTypeRef ElementType, unsigned AddressSpace)) \ >+ macro(unsigned, GetPointerAddressSpace, (LLVMTypeRef PointerTy)) \ >+ macro(LLVMTypeRef, VectorType, (LLVMTypeRef ElementType, unsigned ElementCount)) \ >+ macro(unsigned, GetVectorSize, (LLVMTypeRef VectorTy)) \ >+ macro(LLVMTypeRef, VoidTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, LabelTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, X86MMXTypeInContext, (LLVMContextRef C)) \ >+ macro(LLVMTypeRef, VoidType, (void)) \ >+ macro(LLVMTypeRef, LabelType, (void)) \ >+ macro(LLVMTypeRef, X86MMXType, (void)) \ >+ macro(LLVMTypeRef, TypeOf, (LLVMValueRef Val)) \ >+ macro(const char *, GetValueName, (LLVMValueRef Val)) \ >+ macro(void, SetValueName, (LLVMValueRef Val, const char *Name)) \ >+ macro(void, DumpValue, (LLVMValueRef Val)) \ >+ macro(void, ReplaceAllUsesWith, (LLVMValueRef OldVal, LLVMValueRef NewVal)) \ >+ macro(LLVMBool, IsConstant, (LLVMValueRef Val)) \ >+ macro(LLVMBool, IsUndef, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAArgument, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsABasicBlock, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAInlineAsm, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMDNode, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMDString, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAUser, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstant, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsABlockAddress, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantAggregateZero, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantArray, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantExpr, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantFP, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantInt, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantPointerNull, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantStruct, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAConstantVector, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAGlobalValue, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFunction, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAGlobalAlias, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAGlobalVariable, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAUndefValue, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAInstruction, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsABinaryOperator, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsACallInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAIntrinsicInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsADbgInfoIntrinsic, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsADbgDeclareInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMemIntrinsic, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMemCpyInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMemMoveInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAMemSetInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsACmpInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFCmpInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAICmpInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAExtractElementInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAGetElementPtrInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAInsertElementInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAInsertValueInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsALandingPadInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAPHINode, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsASelectInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAShuffleVectorInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAStoreInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsATerminatorInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsABranchInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAIndirectBrInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAInvokeInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAReturnInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsASwitchInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAUnreachableInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAResumeInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAUnaryInstruction, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAAllocaInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsACastInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsABitCastInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFPExtInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFPToSIInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFPToUIInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAFPTruncInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAIntToPtrInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAPtrToIntInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsASExtInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsASIToFPInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsATruncInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAUIToFPInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAZExtInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAExtractValueInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsALoadInst, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, IsAVAArgInst, (LLVMValueRef Val)) \ >+ macro(LLVMUseRef, GetFirstUse, (LLVMValueRef Val)) \ >+ macro(LLVMUseRef, GetNextUse, (LLVMUseRef U)) \ >+ macro(LLVMValueRef, GetUser, (LLVMUseRef U)) \ >+ macro(LLVMValueRef, GetUsedValue, (LLVMUseRef U)) \ >+ macro(LLVMValueRef, GetOperand, (LLVMValueRef Val, unsigned Index)) \ >+ macro(void, SetOperand, (LLVMValueRef User, unsigned Index, LLVMValueRef Val)) \ >+ macro(int, GetNumOperands, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, ConstNull, (LLVMTypeRef Ty)) \ >+ macro(LLVMValueRef, ConstAllOnes, (LLVMTypeRef Ty)) \ >+ macro(LLVMValueRef, GetUndef, (LLVMTypeRef Ty)) \ >+ macro(LLVMBool, IsNull, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, ConstPointerNull, (LLVMTypeRef Ty)) \ >+ macro(LLVMValueRef, ConstInt, (LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)) \ >+ macro(LLVMValueRef, ConstIntOfArbitraryPrecision, (LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])) \ >+ macro(LLVMValueRef, ConstIntOfString, (LLVMTypeRef IntTy, const char *Text, uint8_t Radix)) \ >+ macro(LLVMValueRef, ConstIntOfStringAndSize, (LLVMTypeRef IntTy, const char *Text, unsigned SLen, uint8_t Radix)) \ >+ macro(LLVMValueRef, ConstReal, (LLVMTypeRef RealTy, double N)) \ >+ macro(LLVMValueRef, ConstRealOfString, (LLVMTypeRef RealTy, const char *Text)) \ >+ macro(LLVMValueRef, ConstRealOfStringAndSize, (LLVMTypeRef RealTy, const char *Text, unsigned SLen)) \ >+ macro(unsigned long long, ConstIntGetZExtValue, (LLVMValueRef ConstantVal)) \ >+ macro(long long, ConstIntGetSExtValue, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstStringInContext, (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)) \ >+ macro(LLVMValueRef, ConstString, (const char *Str, unsigned Length, LLVMBool DontNullTerminate)) \ >+ macro(LLVMValueRef, ConstStructInContext, (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)) \ >+ macro(LLVMValueRef, ConstStruct, (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)) \ >+ macro(LLVMValueRef, ConstArray, (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)) \ >+ macro(LLVMValueRef, ConstNamedStruct, (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)) \ >+ macro(LLVMValueRef, ConstVector, (LLVMValueRef *ScalarConstantVals, unsigned Size)) \ >+ macro(LLVMOpcode, GetConstOpcode, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, AlignOf, (LLVMTypeRef Ty)) \ >+ macro(LLVMValueRef, SizeOf, (LLVMTypeRef Ty)) \ >+ macro(LLVMValueRef, ConstNeg, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstNSWNeg, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstNUWNeg, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstFNeg, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstNot, (LLVMValueRef ConstantVal)) \ >+ macro(LLVMValueRef, ConstAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNSWAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNUWAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNSWSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNUWSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNSWMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstNUWMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstUDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstSDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstExactSDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstURem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstSRem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFRem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstAnd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstOr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstXor, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstICmp, (LLVMIntPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstFCmp, (LLVMRealPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstShl, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstLShr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstAShr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \ >+ macro(LLVMValueRef, ConstGEP, (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)) \ >+ macro(LLVMValueRef, ConstInBoundsGEP, (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)) \ >+ macro(LLVMValueRef, ConstTrunc, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstSExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstZExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstFPTrunc, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstFPExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstUIToFP, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstSIToFP, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstFPToUI, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstFPToSI, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstPtrToInt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstIntToPtr, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstZExtOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstSExtOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstTruncOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstPointerCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstIntCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType, LLVMBool isSigned)) \ >+ macro(LLVMValueRef, ConstFPCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \ >+ macro(LLVMValueRef, ConstSelect, (LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, LLVMValueRef ConstantIfFalse)) \ >+ macro(LLVMValueRef, ConstExtractElement, (LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)) \ >+ macro(LLVMValueRef, ConstInsertElement, (LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)) \ >+ macro(LLVMValueRef, ConstShuffleVector, (LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)) \ >+ macro(LLVMValueRef, ConstExtractValue, (LLVMValueRef AggConstant, unsigned *IdxList, unsigned NumIdx)) \ >+ macro(LLVMValueRef, ConstInsertValue, (LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, unsigned *IdxList, unsigned NumIdx)) \ >+ macro(LLVMValueRef, ConstInlineAsm, (LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)) \ >+ macro(LLVMValueRef, BlockAddress, (LLVMValueRef F, LLVMBasicBlockRef BB)) \ >+ macro(LLVMModuleRef, GetGlobalParent, (LLVMValueRef Global)) \ >+ macro(LLVMBool, IsDeclaration, (LLVMValueRef Global)) \ >+ macro(LLVMLinkage, GetLinkage, (LLVMValueRef Global)) \ >+ macro(void, SetLinkage, (LLVMValueRef Global, LLVMLinkage Linkage)) \ >+ macro(const char *, GetSection, (LLVMValueRef Global)) \ >+ macro(void, SetSection, (LLVMValueRef Global, const char *Section)) \ >+ macro(LLVMVisibility, GetVisibility, (LLVMValueRef Global)) \ >+ macro(void, SetVisibility, (LLVMValueRef Global, LLVMVisibility Viz)) \ >+ macro(unsigned, GetAlignment, (LLVMValueRef Global)) \ >+ macro(void, SetAlignment, (LLVMValueRef Global, unsigned Bytes)) \ >+ macro(LLVMValueRef, AddGlobal, (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)) \ >+ macro(LLVMValueRef, AddGlobalInAddressSpace, (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)) \ >+ macro(LLVMValueRef, GetNamedGlobal, (LLVMModuleRef M, const char *Name)) \ >+ macro(LLVMValueRef, GetFirstGlobal, (LLVMModuleRef M)) \ >+ macro(LLVMValueRef, GetLastGlobal, (LLVMModuleRef M)) \ >+ macro(LLVMValueRef, GetNextGlobal, (LLVMValueRef GlobalVar)) \ >+ macro(LLVMValueRef, GetPreviousGlobal, (LLVMValueRef GlobalVar)) \ >+ macro(void, DeleteGlobal, (LLVMValueRef GlobalVar)) \ >+ macro(LLVMValueRef, GetInitializer, (LLVMValueRef GlobalVar)) \ >+ macro(void, SetInitializer, (LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)) \ >+ macro(LLVMBool, IsThreadLocal, (LLVMValueRef GlobalVar)) \ >+ macro(void, SetThreadLocal, (LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)) \ >+ macro(LLVMBool, IsGlobalConstant, (LLVMValueRef GlobalVar)) \ >+ macro(void, SetGlobalConstant, (LLVMValueRef GlobalVar, LLVMBool IsConstant)) \ >+ macro(LLVMThreadLocalMode, GetThreadLocalMode, (LLVMValueRef GlobalVar)) \ >+ macro(void, SetThreadLocalMode, (LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)) \ >+ macro(LLVMBool, IsExternallyInitialized, (LLVMValueRef GlobalVar)) \ >+ macro(void, SetExternallyInitialized, (LLVMValueRef GlobalVar, LLVMBool IsExtInit)) \ >+ macro(LLVMValueRef, AddAlias, (LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, const char *Name)) \ >+ macro(void, DeleteFunction, (LLVMValueRef Fn)) \ >+ macro(unsigned, GetIntrinsicID, (LLVMValueRef Fn)) \ >+ macro(unsigned, GetFunctionCallConv, (LLVMValueRef Fn)) \ >+ macro(void, SetFunctionCallConv, (LLVMValueRef Fn, unsigned CC)) \ >+ macro(const char *, GetGC, (LLVMValueRef Fn)) \ >+ macro(void, SetGC, (LLVMValueRef Fn, const char *Name)) \ >+ macro(void, AddFunctionAttr, (LLVMValueRef Fn, LLVMAttribute PA)) \ >+ macro(void, AddTargetDependentFunctionAttr, (LLVMValueRef Fn, const char *A, const char *V)) \ >+ macro(LLVMAttribute, GetFunctionAttr, (LLVMValueRef Fn)) \ >+ macro(void, RemoveFunctionAttr, (LLVMValueRef Fn, LLVMAttribute PA)) \ >+ macro(unsigned, CountParams, (LLVMValueRef Fn)) \ >+ macro(void, GetParams, (LLVMValueRef Fn, LLVMValueRef *Params)) \ >+ macro(LLVMValueRef, GetParam, (LLVMValueRef Fn, unsigned Index)) \ >+ macro(LLVMValueRef, GetParamParent, (LLVMValueRef Inst)) \ >+ macro(LLVMValueRef, GetFirstParam, (LLVMValueRef Fn)) \ >+ macro(LLVMValueRef, GetLastParam, (LLVMValueRef Fn)) \ >+ macro(LLVMValueRef, GetNextParam, (LLVMValueRef Arg)) \ >+ macro(LLVMValueRef, GetPreviousParam, (LLVMValueRef Arg)) \ >+ macro(void, AddAttribute, (LLVMValueRef Arg, LLVMAttribute PA)) \ >+ macro(void, RemoveAttribute, (LLVMValueRef Arg, LLVMAttribute PA)) \ >+ macro(LLVMAttribute, GetAttribute, (LLVMValueRef Arg)) \ >+ macro(void, SetParamAlignment, (LLVMValueRef Arg, unsigned align)) \ >+ macro(LLVMValueRef, MDStringInContext, (LLVMContextRef C, const char *Str, unsigned SLen)) \ >+ macro(LLVMValueRef, MDString, (const char *Str, unsigned SLen)) \ >+ macro(LLVMValueRef, MDNodeInContext, (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)) \ >+ macro(LLVMValueRef, MDNode, (LLVMValueRef *Vals, unsigned Count)) \ >+ macro(const char *, GetMDString, (LLVMValueRef V, unsigned* Len)) \ >+ macro(unsigned, GetMDNodeNumOperands, (LLVMValueRef V)) \ >+ macro(void, GetMDNodeOperands, (LLVMValueRef V, LLVMValueRef *Dest)) \ >+ macro(LLVMValueRef, BasicBlockAsValue, (LLVMBasicBlockRef BB)) \ >+ macro(LLVMBool, ValueIsBasicBlock, (LLVMValueRef Val)) \ >+ macro(LLVMBasicBlockRef, ValueAsBasicBlock, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, GetBasicBlockParent, (LLVMBasicBlockRef BB)) \ >+ macro(LLVMValueRef, GetBasicBlockTerminator, (LLVMBasicBlockRef BB)) \ >+ macro(unsigned, CountBasicBlocks, (LLVMValueRef Fn)) \ >+ macro(void, GetBasicBlocks, (LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks)) \ >+ macro(LLVMBasicBlockRef, GetFirstBasicBlock, (LLVMValueRef Fn)) \ >+ macro(LLVMBasicBlockRef, GetLastBasicBlock, (LLVMValueRef Fn)) \ >+ macro(LLVMBasicBlockRef, GetNextBasicBlock, (LLVMBasicBlockRef BB)) \ >+ macro(LLVMBasicBlockRef, GetPreviousBasicBlock, (LLVMBasicBlockRef BB)) \ >+ macro(LLVMBasicBlockRef, GetEntryBasicBlock, (LLVMValueRef Fn)) \ >+ macro(LLVMBasicBlockRef, AppendBasicBlockInContext, (LLVMContextRef C, LLVMValueRef Fn, const char *Name)) \ >+ macro(LLVMBasicBlockRef, AppendBasicBlock, (LLVMValueRef Fn, const char *Name)) \ >+ macro(LLVMBasicBlockRef, InsertBasicBlockInContext, (LLVMContextRef C, LLVMBasicBlockRef BB, const char *Name)) \ >+ macro(LLVMBasicBlockRef, InsertBasicBlock, (LLVMBasicBlockRef InsertBeforeBB, const char *Name)) \ >+ macro(void, DeleteBasicBlock, (LLVMBasicBlockRef BB)) \ >+ macro(void, RemoveBasicBlockFromParent, (LLVMBasicBlockRef BB)) \ >+ macro(void, MoveBasicBlockBefore, (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)) \ >+ macro(void, MoveBasicBlockAfter, (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)) \ >+ macro(LLVMValueRef, GetFirstInstruction, (LLVMBasicBlockRef BB)) \ >+ macro(LLVMValueRef, GetLastInstruction, (LLVMBasicBlockRef BB)) \ >+ macro(int, HasMetadata, (LLVMValueRef Val)) \ >+ macro(LLVMValueRef, GetMetadata, (LLVMValueRef Val, unsigned KindID)) \ >+ macro(void, SetMetadata, (LLVMValueRef Val, unsigned KindID, LLVMValueRef Node)) \ >+ macro(LLVMBasicBlockRef, GetInstructionParent, (LLVMValueRef Inst)) \ >+ macro(LLVMValueRef, GetNextInstruction, (LLVMValueRef Inst)) \ >+ macro(LLVMValueRef, GetPreviousInstruction, (LLVMValueRef Inst)) \ >+ macro(void, InstructionEraseFromParent, (LLVMValueRef Inst)) \ >+ macro(LLVMOpcode, GetInstructionOpcode, (LLVMValueRef Inst)) \ >+ macro(LLVMIntPredicate, GetICmpPredicate, (LLVMValueRef Inst)) \ >+ macro(void, SetInstructionCallConv, (LLVMValueRef Instr, unsigned CC)) \ >+ macro(unsigned, GetInstructionCallConv, (LLVMValueRef Instr)) \ >+ macro(void, AddInstrAttribute, (LLVMValueRef Instr, unsigned index, LLVMAttribute)) \ >+ macro(void, RemoveInstrAttribute, (LLVMValueRef Instr, unsigned index, LLVMAttribute)) \ >+ macro(void, SetInstrParamAlignment, (LLVMValueRef Instr, unsigned index, unsigned align)) \ >+ macro(LLVMBool, IsTailCall, (LLVMValueRef CallInst)) \ >+ macro(void, SetTailCall, (LLVMValueRef CallInst, LLVMBool IsTailCall)) \ >+ macro(LLVMBasicBlockRef, GetSwitchDefaultDest, (LLVMValueRef SwitchInstr)) \ >+ macro(void, AddIncoming, (LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count)) \ >+ macro(unsigned, CountIncoming, (LLVMValueRef PhiNode)) \ >+ macro(LLVMValueRef, GetIncomingValue, (LLVMValueRef PhiNode, unsigned Index)) \ >+ macro(LLVMBasicBlockRef, GetIncomingBlock, (LLVMValueRef PhiNode, unsigned Index)) \ >+ macro(LLVMBuilderRef, CreateBuilderInContext, (LLVMContextRef C)) \ >+ macro(LLVMBuilderRef, CreateBuilder, (void)) \ >+ macro(void, PositionBuilder, (LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)) \ >+ macro(void, PositionBuilderBefore, (LLVMBuilderRef Builder, LLVMValueRef Instr)) \ >+ macro(void, PositionBuilderAtEnd, (LLVMBuilderRef Builder, LLVMBasicBlockRef Block)) \ >+ macro(LLVMBasicBlockRef, GetInsertBlock, (LLVMBuilderRef Builder)) \ >+ macro(void, ClearInsertionPosition, (LLVMBuilderRef Builder)) \ >+ macro(void, InsertIntoBuilder, (LLVMBuilderRef Builder, LLVMValueRef Instr)) \ >+ macro(void, InsertIntoBuilderWithName, (LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)) \ >+ macro(void, DisposeBuilder, (LLVMBuilderRef Builder)) \ >+ macro(void, SetCurrentDebugLocation, (LLVMBuilderRef Builder, LLVMValueRef L)) \ >+ macro(LLVMValueRef, GetCurrentDebugLocation, (LLVMBuilderRef Builder)) \ >+ macro(void, SetInstDebugLocation, (LLVMBuilderRef Builder, LLVMValueRef Inst)) \ >+ macro(LLVMValueRef, BuildRetVoid, (LLVMBuilderRef)) \ >+ macro(LLVMValueRef, BuildRet, (LLVMBuilderRef, LLVMValueRef V)) \ >+ macro(LLVMValueRef, BuildAggregateRet, (LLVMBuilderRef, LLVMValueRef *RetVals, unsigned N)) \ >+ macro(LLVMValueRef, BuildBr, (LLVMBuilderRef, LLVMBasicBlockRef Dest)) \ >+ macro(LLVMValueRef, BuildCondBr, (LLVMBuilderRef, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)) \ >+ macro(LLVMValueRef, BuildSwitch, (LLVMBuilderRef, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)) \ >+ macro(LLVMValueRef, BuildIndirectBr, (LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)) \ >+ macro(LLVMValueRef, BuildInvoke, (LLVMBuilderRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)) \ >+ macro(LLVMValueRef, BuildLandingPad, (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)) \ >+ macro(LLVMValueRef, BuildResume, (LLVMBuilderRef B, LLVMValueRef Exn)) \ >+ macro(LLVMValueRef, BuildUnreachable, (LLVMBuilderRef)) \ >+ macro(void, AddCase, (LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)) \ >+ macro(void, AddDestination, (LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)) \ >+ macro(void, AddClause, (LLVMValueRef LandingPad, LLVMValueRef ClauseVal)) \ >+ macro(void, SetCleanup, (LLVMValueRef LandingPad, LLVMBool Val)) \ >+ macro(LLVMValueRef, BuildAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNSWAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNUWAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNSWSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNUWSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNSWMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNUWMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildUDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildSDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildExactSDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildURem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildSRem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFRem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildShl, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildLShr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildAShr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildAnd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildOr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildXor, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildBinOp, (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildNeg, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \ >+ macro(LLVMValueRef, BuildNSWNeg, (LLVMBuilderRef B, LLVMValueRef V, const char *Name)) \ >+ macro(LLVMValueRef, BuildNUWNeg, (LLVMBuilderRef B, LLVMValueRef V, const char *Name)) \ >+ macro(LLVMValueRef, BuildFNeg, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \ >+ macro(LLVMValueRef, BuildNot, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \ >+ macro(LLVMValueRef, BuildMalloc, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \ >+ macro(LLVMValueRef, BuildArrayMalloc, (LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)) \ >+ macro(LLVMValueRef, BuildAlloca, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \ >+ macro(LLVMValueRef, BuildArrayAlloca, (LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)) \ >+ macro(LLVMValueRef, BuildFree, (LLVMBuilderRef, LLVMValueRef PointerVal)) \ >+ macro(LLVMValueRef, BuildLoad, (LLVMBuilderRef, LLVMValueRef PointerVal, const char *Name)) \ >+ macro(LLVMValueRef, BuildStore, (LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)) \ >+ macro(LLVMValueRef, BuildGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)) \ >+ macro(LLVMValueRef, BuildInBoundsGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)) \ >+ macro(LLVMValueRef, BuildStructGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, unsigned Idx, const char *Name)) \ >+ macro(LLVMValueRef, BuildGlobalString, (LLVMBuilderRef B, const char *Str, const char *Name)) \ >+ macro(LLVMValueRef, BuildGlobalStringPtr, (LLVMBuilderRef B, const char *Str, const char *Name)) \ >+ macro(LLVMBool, GetVolatile, (LLVMValueRef MemoryAccessInst)) \ >+ macro(void, SetVolatile, (LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)) \ >+ macro(LLVMValueRef, BuildTrunc, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildZExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildSExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildFPToUI, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildFPToSI, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildUIToFP, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildSIToFP, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildFPTrunc, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildFPExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildPtrToInt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildIntToPtr, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildZExtOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildSExtOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildTruncOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildCast, (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildPointerCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildIntCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildFPCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \ >+ macro(LLVMValueRef, BuildICmp, (LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildFCmp, (LLVMBuilderRef, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildPhi, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \ >+ macro(LLVMValueRef, BuildCall, (LLVMBuilderRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)) \ >+ macro(LLVMValueRef, BuildSelect, (LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)) \ >+ macro(LLVMValueRef, BuildVAArg, (LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)) \ >+ macro(LLVMValueRef, BuildExtractElement, (LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)) \ >+ macro(LLVMValueRef, BuildInsertElement, (LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)) \ >+ macro(LLVMValueRef, BuildShuffleVector, (LLVMBuilderRef, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)) \ >+ macro(LLVMValueRef, BuildExtractValue, (LLVMBuilderRef, LLVMValueRef AggVal, unsigned Index, const char *Name)) \ >+ macro(LLVMValueRef, BuildInsertValue, (LLVMBuilderRef, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)) \ >+ macro(LLVMValueRef, BuildIsNull, (LLVMBuilderRef, LLVMValueRef Val, const char *Name)) \ >+ macro(LLVMValueRef, BuildIsNotNull, (LLVMBuilderRef, LLVMValueRef Val, const char *Name)) \ >+ macro(LLVMValueRef, BuildPtrDiff, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \ >+ macro(LLVMValueRef, BuildAtomicRMW, (LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)) \ >+ macro(LLVMModuleProviderRef, CreateModuleProviderForExistingModule, (LLVMModuleRef M)) \ >+ macro(void, DisposeModuleProvider, (LLVMModuleProviderRef M)) \ >+ macro(LLVMBool, CreateMemoryBufferWithContentsOfFile, (const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)) \ >+ macro(LLVMBool, CreateMemoryBufferWithSTDIN, (LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)) \ >+ macro(LLVMMemoryBufferRef, CreateMemoryBufferWithMemoryRange, (const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)) \ >+ macro(LLVMMemoryBufferRef, CreateMemoryBufferWithMemoryRangeCopy, (const char *InputData, size_t InputDataLength, const char *BufferName)) \ >+ macro(const char *, GetBufferStart, (LLVMMemoryBufferRef MemBuf)) \ >+ macro(size_t, GetBufferSize, (LLVMMemoryBufferRef MemBuf)) \ >+ macro(void, DisposeMemoryBuffer, (LLVMMemoryBufferRef MemBuf)) \ >+ macro(LLVMPassRegistryRef, GetGlobalPassRegistry, (void)) \ >+ macro(LLVMPassManagerRef, CreatePassManager, (void)) \ >+ macro(LLVMPassManagerRef, CreateFunctionPassManagerForModule, (LLVMModuleRef M)) \ >+ macro(LLVMPassManagerRef, CreateFunctionPassManager, (LLVMModuleProviderRef MP)) \ >+ macro(LLVMBool, RunPassManager, (LLVMPassManagerRef PM, LLVMModuleRef M)) \ >+ macro(LLVMBool, InitializeFunctionPassManager, (LLVMPassManagerRef FPM)) \ >+ macro(LLVMBool, RunFunctionPassManager, (LLVMPassManagerRef FPM, LLVMValueRef F)) \ >+ macro(LLVMBool, FinalizeFunctionPassManager, (LLVMPassManagerRef FPM)) \ >+ macro(void, DisposePassManager, (LLVMPassManagerRef PM)) \ >+ macro(LLVMBool, StartMultithreaded, ()) \ >+ macro(void, StopMultithreaded, ()) \ >+ macro(LLVMBool, IsMultithreaded, ()) \ >+ macro(LLVMTargetDataRef, CreateTargetData, (const char *StringRep)) \ >+ macro(void, AddTargetData, (LLVMTargetDataRef, LLVMPassManagerRef)) \ >+ macro(void, AddTargetLibraryInfo, (LLVMTargetLibraryInfoRef, LLVMPassManagerRef)) \ >+ macro(char *, CopyStringRepOfTargetData, (LLVMTargetDataRef)) \ >+ macro(enum LLVMByteOrdering, ByteOrder, (LLVMTargetDataRef)) \ >+ macro(unsigned, PointerSize, (LLVMTargetDataRef)) \ >+ macro(LLVMTypeRef, IntPtrType, (LLVMTargetDataRef)) \ >+ macro(unsigned long long, SizeOfTypeInBits, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned long long, StoreSizeOfType, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned long long, ABISizeOfType, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned, ABIAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned, CallFrameAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned, PreferredAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \ >+ macro(unsigned, PreferredAlignmentOfGlobal, (LLVMTargetDataRef, LLVMValueRef GlobalVar)) \ >+ macro(unsigned, ElementAtOffset, (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned long long Offset)) \ >+ macro(unsigned long long, OffsetOfElement, (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned Element)) \ >+ macro(void, DisposeTargetData, (LLVMTargetDataRef)) \ >+ macro(LLVMTargetRef, GetFirstTarget, ()) \ >+ macro(LLVMTargetRef, GetNextTarget, (LLVMTargetRef T)) \ >+ macro(const char *, GetTargetName, (LLVMTargetRef T)) \ >+ macro(const char *, GetTargetDescription, (LLVMTargetRef T)) \ >+ macro(LLVMBool, TargetHasJIT, (LLVMTargetRef T)) \ >+ macro(LLVMBool, TargetHasTargetMachine, (LLVMTargetRef T)) \ >+ macro(LLVMBool, TargetHasAsmBackend, (LLVMTargetRef T)) \ >+ macro(LLVMTargetMachineRef, CreateTargetMachine, (LLVMTargetRef T, char *Triple, char *CPU, char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel)) \ >+ macro(void, DisposeTargetMachine, (LLVMTargetMachineRef T)) \ >+ macro(LLVMTargetRef, GetTargetMachineTarget, (LLVMTargetMachineRef T)) \ >+ macro(char *, GetTargetMachineTriple, (LLVMTargetMachineRef T)) \ >+ macro(char *, GetTargetMachineCPU, (LLVMTargetMachineRef T)) \ >+ macro(char *, GetTargetMachineFeatureString, (LLVMTargetMachineRef T)) \ >+ macro(LLVMTargetDataRef, GetTargetMachineData, (LLVMTargetMachineRef T)) \ >+ macro(LLVMBool, TargetMachineEmitToFile, (LLVMTargetMachineRef T, LLVMModuleRef M, char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage)) \ >+ macro(void, LinkInJIT, (void)) \ >+ macro(void, LinkInMCJIT, (void)) \ >+ macro(void, LinkInInterpreter, (void)) \ >+ macro(LLVMGenericValueRef, CreateGenericValueOfInt, (LLVMTypeRef Ty, unsigned long long N, LLVMBool IsSigned)) \ >+ macro(LLVMGenericValueRef, CreateGenericValueOfPointer, (void *P)) \ >+ macro(LLVMGenericValueRef, CreateGenericValueOfFloat, (LLVMTypeRef Ty, double N)) \ >+ macro(unsigned, GenericValueIntWidth, (LLVMGenericValueRef GenValRef)) \ >+ macro(unsigned long long, GenericValueToInt, (LLVMGenericValueRef GenVal, LLVMBool IsSigned)) \ >+ macro(void *, GenericValueToPointer, (LLVMGenericValueRef GenVal)) \ >+ macro(double, GenericValueToFloat, (LLVMTypeRef TyRef, LLVMGenericValueRef GenVal)) \ >+ macro(void, DisposeGenericValue, (LLVMGenericValueRef GenVal)) \ >+ macro(LLVMBool, CreateExecutionEngineForModule, (LLVMExecutionEngineRef *OutEE, LLVMModuleRef M, char **OutError)) \ >+ macro(LLVMBool, CreateInterpreterForModule, (LLVMExecutionEngineRef *OutInterp, LLVMModuleRef M, char **OutError)) \ >+ macro(LLVMBool, CreateJITCompilerForModule, (LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, unsigned OptLevel, char **OutError)) \ >+ macro(void, InitializeMCJITCompilerOptions, (struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions)) \ >+ macro(LLVMBool, CreateMCJITCompilerForModule, (LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions, char **OutError)) \ >+ macro(LLVMBool, CreateExecutionEngine, (LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, char **OutError)) \ >+ macro(LLVMBool, CreateInterpreter, (LLVMExecutionEngineRef *OutInterp, LLVMModuleProviderRef MP, char **OutError)) \ >+ macro(LLVMBool, CreateJITCompiler, (LLVMExecutionEngineRef *OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, char **OutError)) \ >+ macro(void, DisposeExecutionEngine, (LLVMExecutionEngineRef EE)) \ >+ macro(void, RunStaticConstructors, (LLVMExecutionEngineRef EE)) \ >+ macro(void, RunStaticDestructors, (LLVMExecutionEngineRef EE)) \ >+ macro(int, RunFunctionAsMain, (LLVMExecutionEngineRef EE, LLVMValueRef F, unsigned ArgC, const char * const *ArgV, const char * const *EnvP)) \ >+ macro(LLVMGenericValueRef, RunFunction, (LLVMExecutionEngineRef EE, LLVMValueRef F, unsigned NumArgs, LLVMGenericValueRef *Args)) \ >+ macro(void, FreeMachineCodeForFunction, (LLVMExecutionEngineRef EE, LLVMValueRef F)) \ >+ macro(void, AddModule, (LLVMExecutionEngineRef EE, LLVMModuleRef M)) \ >+ macro(void, AddModuleProvider, (LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP)) \ >+ macro(LLVMBool, RemoveModule, (LLVMExecutionEngineRef EE, LLVMModuleRef M, LLVMModuleRef *OutMod, char **OutError)) \ >+ macro(LLVMBool, RemoveModuleProvider, (LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef *OutMod, char **OutError)) \ >+ macro(LLVMBool, FindFunction, (LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn)) \ >+ macro(void *, RecompileAndRelinkFunction, (LLVMExecutionEngineRef EE, LLVMValueRef Fn)) \ >+ macro(LLVMTargetDataRef, GetExecutionEngineTargetData, (LLVMExecutionEngineRef EE)) \ >+ macro(void, AddGlobalMapping, (LLVMExecutionEngineRef EE, LLVMValueRef Global, void* Addr)) \ >+ macro(void *, GetPointerToGlobal, (LLVMExecutionEngineRef EE, LLVMValueRef Global)) \ >+ macro(LLVMMCJITMemoryManagerRef, CreateSimpleMCJITMemoryManager, (void *Opaque, LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, LLVMMemoryManagerDestroyCallback Destory)) \ >+ macro(void, DisposeMCJITMemoryManager, (LLVMMCJITMemoryManagerRef MM)) \ >+ macro(LLVMBool, VerifyModule, (LLVMModuleRef M, LLVMVerifierFailureAction Action, char **OutMessage)) \ >+ macro(LLVMBool, VerifyFunction, (LLVMValueRef Fn, LLVMVerifierFailureAction Action)) \ >+ macro(void, ViewFunctionCFG, (LLVMValueRef Fn)) \ >+ macro(void, ViewFunctionCFGOnly, (LLVMValueRef Fn)) \ >+ macro(LLVMDisasmContextRef, CreateDisasm, (const char *TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)) \ >+ macro(LLVMDisasmContextRef, CreateDisasmCPU, (const char *Triple, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)) \ >+ macro(int, SetDisasmOptions, (LLVMDisasmContextRef DC, uint64_t Options)) \ >+ macro(void, DisasmDispose, (LLVMDisasmContextRef DC)) \ >+ macro(size_t, DisasmInstruction, (LLVMDisasmContextRef DC, uint8_t *Bytes, uint64_t BytesSize, uint64_t PC, char *OutString, size_t OutStringSize)) \ >+ macro(unsigned, PointerSizeForAS, (LLVMTargetDataRef, unsigned AS)) \ >+ macro(LLVMTypeRef, IntPtrTypeForAS, (LLVMTargetDataRef, unsigned AS)) \ >+ macro(LLVMPassManagerBuilderRef, PassManagerBuilderCreate, (void)) \ >+ macro(void, PassManagerBuilderDispose, (LLVMPassManagerBuilderRef PMB)) \ >+ macro(void, PassManagerBuilderSetOptLevel, (LLVMPassManagerBuilderRef PMB, unsigned OptLevel)) \ >+ macro(void, PassManagerBuilderSetSizeLevel, (LLVMPassManagerBuilderRef PMB, unsigned SizeLevel)) \ >+ macro(void, PassManagerBuilderSetDisableUnitAtATime, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \ >+ macro(void, PassManagerBuilderSetDisableUnrollLoops, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \ >+ macro(void, PassManagerBuilderSetDisableSimplifyLibCalls, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \ >+ macro(void, PassManagerBuilderUseInlinerWithThreshold, (LLVMPassManagerBuilderRef PMB, unsigned Threshold)) \ >+ macro(void, PassManagerBuilderPopulateFunctionPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \ >+ macro(void, PassManagerBuilderPopulateModulePassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \ >+ macro(void, PassManagerBuilderPopulateLTOPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner)) \ >+ macro(void, AddAggressiveDCEPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddCFGSimplificationPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddDeadStoreEliminationPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddGVNPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddIndVarSimplifyPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddInstructionCombiningPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddJumpThreadingPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLICMPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLoopDeletionPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLoopIdiomPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLoopRotatePass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLoopUnrollPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLoopUnswitchPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddMemCpyOptPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddPartiallyInlineLibCallsPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddPromoteMemoryToRegisterPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddReassociatePass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddSCCPPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddScalarReplAggregatesPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddScalarReplAggregatesPassSSA, (LLVMPassManagerRef PM)) \ >+ macro(void, AddScalarReplAggregatesPassWithThreshold, (LLVMPassManagerRef PM, int Threshold)) \ >+ macro(void, AddSimplifyLibCallsPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddTailCallEliminationPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddConstantPropagationPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddDemoteMemoryToRegisterPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddVerifierPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddCorrelatedValuePropagationPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddEarlyCSEPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddLowerExpectIntrinsicPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddTypeBasedAliasAnalysisPass, (LLVMPassManagerRef PM)) \ >+ macro(void, AddBasicAliasAnalysisPass, (LLVMPassManagerRef PM)) >+ >+#endif // LLVMAPIFunctions_h >+ >Index: Source/JavaScriptCore/llvm/LLVMHeaders.h >=================================================================== >--- Source/JavaScriptCore/llvm/LLVMHeaders.h (revision 0) >+++ Source/JavaScriptCore/llvm/LLVMHeaders.h (working copy) >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef LLVMHeaders_h >+#define LLVMHeaders_h >+ >+#if HAVE(LLVM) >+ >+// It is necessary to include LLVM headers via this file, because: >+// - LLVM requires defining things that we don't normally define, and >+// - LLVM includes its C++ headers from its C headers, and its C++ >+// headers don't compile cleanly with our warnings. >+ >+#define __STDC_LIMIT_MACROS >+#define __STDC_CONSTANT_MACROS >+ >+#if COMPILER(CLANG) >+#pragma clang diagnostic push >+#pragma clang diagnostic ignored "-Wmissing-noreturn" >+#pragma clang diagnostic ignored "-Wunused-parameter" >+#endif // COMPILER(CLANG) >+ >+#include <llvm-c/Analysis.h> >+#include <llvm-c/Core.h> >+#include <llvm-c/Disassembler.h> >+#include <llvm-c/ExecutionEngine.h> >+#include <llvm-c/Target.h> >+#include <llvm-c/Transforms/PassManagerBuilder.h> >+#include <llvm-c/Transforms/Scalar.h> >+ >+#if COMPILER(CLANG) >+#pragma clang diagnostic pop >+#endif // COMPILER(CLANG) >+ >+#undef __STDC_LIMIT_MACROS >+#undef __STDC_CONSTANT_MACROS >+ >+#endif // HAVE(LLVM) >+ >+#endif // LLVMHeaders_h >+ >+ >Index: Source/JavaScriptCore/llvm/library/LLVMAnchor.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/library/LLVMAnchor.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/library/LLVMAnchor.cpp (working copy) >@@ -0,0 +1,35 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config_llvm.h" >+ >+#if HAVE(LLVM) >+ >+// This is a hack for ensuring that the build system relinks JavaScriptCore if any >+// of the LLVM libraries are known to have changed. >+#include "WebKitLLVMLibraryToken.h" >+ >+#endif // HAVE(LLVM) >+ >Index: Source/JavaScriptCore/llvm/library/LLVMExports.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/library/LLVMExports.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/library/LLVMExports.cpp (working copy) >@@ -0,0 +1,51 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config_llvm.h" >+ >+#if HAVE(LLVM) >+ >+#include "LLVMAPI.h" >+ >+extern "C" WTF_EXPORT_PRIVATE JSC::LLVMAPI* initializeAndGetJSCLLVMAPI(); >+ >+extern "C" JSC::LLVMAPI* initializeAndGetJSCLLVMAPI() >+{ >+ LLVMLinkInMCJIT(); >+ LLVMInitializeNativeTarget(); >+ LLVMInitializeX86AsmPrinter(); >+ LLVMInitializeX86Disassembler(); >+ >+ JSC::LLVMAPI* result = new JSC::LLVMAPI; >+ >+#define LLVM_API_FUNCTION_ASSIGNMENT(returnType, name, signature) \ >+ result->name = LLVM##name; >+ FOR_EACH_LLVM_API_FUNCTION(LLVM_API_FUNCTION_ASSIGNMENT); >+#undef LLVM_API_FUNCTION_ASSIGNMENT >+ >+ return result; >+} >+ >+#endif // HAVE(LLVM) >Index: Source/JavaScriptCore/llvm/library/LLVMOverrides.cpp >=================================================================== >--- Source/JavaScriptCore/llvm/library/LLVMOverrides.cpp (revision 0) >+++ Source/JavaScriptCore/llvm/library/LLVMOverrides.cpp (working copy) >@@ -0,0 +1,33 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config_llvm.h" >+ >+#if HAVE(LLVM) >+ >+extern "C" int __cxa_atexit(); >+extern "C" int __cxa_atexit() { return 0; } >+ >+#endif // HAVE(LLVM) >Index: Source/JavaScriptCore/llvm/library/config_llvm.h >=================================================================== >--- Source/JavaScriptCore/llvm/library/config_llvm.h (revision 0) >+++ Source/JavaScriptCore/llvm/library/config_llvm.h (working copy) >@@ -0,0 +1,28 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include <wtf/Platform.h> >+#include <wtf/ExportMacros.h> >+ >Index: Source/JavaScriptCore/runtime/InitializeThreading.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/InitializeThreading.cpp (revision 157204) >+++ Source/JavaScriptCore/runtime/InitializeThreading.cpp (working copy) >@@ -34,13 +34,13 @@ > #include "HeapStatistics.h" > #include "Options.h" > #include "Identifier.h" >+#include "InitializeLLVM.h" > #include "JSDateMath.h" > #include "JSGlobalObject.h" > #include "JSLock.h" > #include "LLIntData.h" > #include "WriteBarrier.h" > #include <wtf/dtoa.h> >-#include <wtf/LLVMHeaders.h> > #include <wtf/Threading.h> > #include <wtf/dtoa/cached-powers.h> > >@@ -70,24 +70,6 @@ static void initializeThreadingOnce() > #if ENABLE(LLINT) > LLInt::initialize(); > #endif >-#if HAVE(LLVM) >- bool ftl = false; >- bool disassembler = false; >-#if ENABLE(FTL_JIT) >- ftl = true; >-#endif >-#if USE(LLVM_DISASSEMBLER) >- disassembler = true; >-#endif >- if (ftl) >- LLVMLinkInMCJIT(); >- if (ftl || disassembler) >- LLVMInitializeNativeTarget(); >- if (ftl) >- LLVMInitializeX86AsmPrinter(); >- if (disassembler) >- LLVMInitializeX86Disassembler(); >-#endif // HAVE(LLVM) > } > > void initializeThreading() >Index: Source/JavaScriptCore/runtime/Options.h >=================================================================== >--- Source/JavaScriptCore/runtime/Options.h (revision 157204) >+++ Source/JavaScriptCore/runtime/Options.h (working copy) >@@ -205,9 +205,7 @@ typedef OptionRange optionRange; > v(bool, logGC, false) \ > v(unsigned, gcMaxHeapSize, 0) \ > v(bool, recordGCPauseTimes, false) \ >- v(bool, logHeapStatisticsAtExit, false) \ >- \ >- v(bool, neverDeleteVMInCommandLine, false) >+ v(bool, logHeapStatisticsAtExit, false) > > class Options { > public: >Index: Source/WTF/ChangeLog >=================================================================== >--- Source/WTF/ChangeLog (revision 157204) >+++ Source/WTF/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2013-10-09 Filip Pizlo <fpizlo@apple.com> >+ >+ FTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time destructors >+ https://bugs.webkit.org/show_bug.cgi?id=122566 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove all LLVM stuff from WTF since to get LLVM you need to soft-link and it's >+ entirely the responsibility of JSC to do that. >+ >+ Also fixed an export goof that I found after fixing the weak thingy script in JSC. >+ >+ * WTF.xcodeproj/project.pbxproj: >+ * wtf/LLVMHeaders.h: Removed. >+ * wtf/text/CString.h: >+ (WTF::CStringHash::hash): >+ > 2013-10-09 Michael Saboff <msaboff@apple.com> > > Change to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1 >Index: Source/WTF/WTF.xcodeproj/project.pbxproj >=================================================================== >--- Source/WTF/WTF.xcodeproj/project.pbxproj (revision 157204) >+++ Source/WTF/WTF.xcodeproj/project.pbxproj (working copy) >@@ -330,7 +330,6 @@ > 9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtomicStringTable.h; sourceTree = "<group>"; }; > A70DA0821799F04D00529A9B /* Insertion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Insertion.h; sourceTree = "<group>"; }; > A70DA0831799F04D00529A9B /* ListDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ListDump.h; sourceTree = "<group>"; }; >- A736B3581799E11A00C6F05E /* LLVMHeaders.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LLVMHeaders.h; sourceTree = "<group>"; }; > A748744F17A0BDAE00FA04CB /* SixCharacterHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SixCharacterHash.cpp; sourceTree = "<group>"; }; > A748745017A0BDAE00FA04CB /* SixCharacterHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SixCharacterHash.h; sourceTree = "<group>"; }; > A748745117A0BDAE00FA04CB /* StringHashDumpContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHashDumpContext.h; sourceTree = "<group>"; }; >@@ -672,7 +671,6 @@ > A70DA0821799F04D00529A9B /* Insertion.h */, > A70DA0831799F04D00529A9B /* ListDump.h */, > A8A472C1151A825A004123FF /* ListHashSet.h */, >- A736B3581799E11A00C6F05E /* LLVMHeaders.h */, > A8A472C3151A825A004123FF /* Locker.h */, > A8A472CA151A825B004123FF /* MD5.cpp */, > A8A472CB151A825B004123FF /* MD5.h */, >Index: Source/WTF/wtf/LLVMHeaders.h >=================================================================== >--- Source/WTF/wtf/LLVMHeaders.h (revision 157204) >+++ Source/WTF/wtf/LLVMHeaders.h (working copy) >@@ -1,62 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef LLVMHeaders_h >-#define LLVMHeaders_h >- >-#include <wtf/Platform.h> >- >-#if HAVE(LLVM) >- >-// It is necessary to include LLVM headers via this file, because: >-// - LLVM requires defining things that we don't normally define, and >-// - LLVM includes its C++ headers from its C headers, and its C++ >-// headers don't compile cleanly with our warnings. >- >-#undef __STDC_LIMIT_MACROS >-#undef __STDC_CONSTANT_MACROS >-#define __STDC_LIMIT_MACROS >-#define __STDC_CONSTANT_MACROS >- >-#if COMPILER(CLANG) >-#pragma clang diagnostic push >-#pragma clang diagnostic ignored "-Wmissing-noreturn" >-#pragma clang diagnostic ignored "-Wunused-parameter" >-#endif >- >-#include <llvm-c/Analysis.h> >-#include <llvm-c/Core.h> >-#include <llvm-c/Disassembler.h> >-#include <llvm-c/ExecutionEngine.h> >-#include <llvm-c/Target.h> >-#include <llvm-c/Transforms/PassManagerBuilder.h> >- >-#if COMPILER(CLANG) >-#pragma clang diagnostic pop >-#endif >- >-#endif // HAVE(LLVM) >- >-#endif // LLVMHeaders_h >Index: Source/WTF/wtf/text/CString.h >=================================================================== >--- Source/WTF/wtf/text/CString.h (revision 157204) >+++ Source/WTF/wtf/text/CString.h (working copy) >@@ -94,7 +94,7 @@ inline bool operator!=(const CString& a, > bool operator<(const CString& a, const CString& b); > > struct CStringHash { >- WTF_EXPORT_PRIVATE static unsigned hash(const CString& string) { return string.hash(); } >+ static unsigned hash(const CString& string) { return string.hash(); } > WTF_EXPORT_PRIVATE static bool equal(const CString& a, const CString& b); > static const bool safeToCompareToEmptyOrDeleted = true; > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 122566
:
213799
|
213829
|
213834
|
213842
|
213843
|
213844
|
213845
|
213887
|
213912