| Differences between
and this patch
- Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig -5 / +1 lines
Lines 35-49 JSVALUE_MODEL_x86_64 = 64; Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig_sec1
35
// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
35
// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
36
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;
36
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;
37
37
38
OTHER_LDFLAGS_LLVM = $(OTHER_LDFLAGS_LLVM_$(ENABLE_FTL_JIT));
39
OTHER_LDFLAGS_LLVM_ = ;
40
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;
41
42
OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
38
OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
43
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
39
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
44
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
40
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
45
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
41
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
46
OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_LLVM) -sub_library libobjc -framework CoreServices;
42
OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -framework CoreServices;
47
GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
43
GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
48
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
44
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
49
HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS);
45
HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS);
- Source/JavaScriptCore/Configurations/LLVMForJSC.xcconfig +43 lines
Line 0 Source/JavaScriptCore/Configurations/LLVMForJSC.xcconfig_sec1
1
// Copyright (C) 2009 Apple Inc. All rights reserved.
2
//
3
// Redistribution and use in source and binary forms, with or without
4
// modification, are permitted provided that the following conditions
5
// are met:
6
// 1. Redistributions of source code must retain the above copyright
7
//    notice, this list of conditions and the following disclaimer.
8
// 2. Redistributions in binary form must reproduce the above copyright
9
//    notice, this list of conditions and the following disclaimer in the
10
//    documentation and/or other materials provided with the distribution.
11
//
12
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15
// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
23
24
#include "FeatureDefines.xcconfig"
25
#include "Version.xcconfig"
26
27
// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
28
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;
29
30
OTHER_LDFLAGS_LLVM = $(OTHER_LDFLAGS_LLVM_$(ENABLE_FTL_JIT));
31
OTHER_LDFLAGS_LLVM_ = ;
32
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;
33
34
OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
35
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
36
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
37
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
38
OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_LLVM)
39
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
40
HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS);
41
42
INSTALL_PATH_ACTUAL = $(JAVASCRIPTCORE_RESOURCES_DIR);
43
PRODUCT_NAME = llvmForJSC;
- Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +273 lines
Lines 372-377 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec1
372
		0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC815141405118D00CFA603 /* VTableSpectrum.h */; settings = {ATTRIBUTES = (Private, ); }; };
372
		0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC815141405118D00CFA603 /* VTableSpectrum.h */; settings = {ATTRIBUTES = (Private, ); }; };
373
		0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC815121405118600CFA603 /* VTableSpectrum.cpp */; };
373
		0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC815121405118600CFA603 /* VTableSpectrum.cpp */; };
374
		0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */; settings = {ATTRIBUTES = (Private, ); }; };
374
		0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */; settings = {ATTRIBUTES = (Private, ); }; };
375
		0FCEFAB01805CA6D00472CE4 /* InitializeLLVM.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */; settings = {ATTRIBUTES = (Private, ); }; };
376
		0FCEFAB11805CA6D00472CE4 /* InitializeLLVMMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */; };
377
		0FCEFAC11805D94E00472CE4 /* LLVMOverrides.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */; };
378
		0FCEFAC31805E74000472CE4 /* LLVMExports.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */; };
379
		0FCEFACA1805E75500472CE4 /* InitializeLLVM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */; };
380
		0FCEFACB1805E75500472CE4 /* InitializeLLVMPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */; };
381
		0FCEFACC1805E75500472CE4 /* InitializeLLVMPOSIX.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */; settings = {ATTRIBUTES = (Private, ); }; };
382
		0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */; };
383
		0FCEFACE1805E75500472CE4 /* LLVMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
384
		0FCEFACF1805E75500472CE4 /* LLVMAPIFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
385
		0FCEFAD01805E77500472CE4 /* LLVMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC81805E75500472CE4 /* LLVMAPI.h */; };
386
		0FCEFAD11805E77900472CE4 /* LLVMAPIFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */; };
375
		0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
387
		0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
376
		0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */; };
388
		0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */; };
377
		0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; };
389
		0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; };
Lines 1181-1186 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec2
1181
/* End PBXBuildFile section */
1193
/* End PBXBuildFile section */
1182
1194
1183
/* Begin PBXContainerItemProxy section */
1195
/* Begin PBXContainerItemProxy section */
1196
		0FCEFABC1805D66300472CE4 /* PBXContainerItemProxy */ = {
1197
			isa = PBXContainerItemProxy;
1198
			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
1199
			proxyType = 1;
1200
			remoteGlobalIDString = 0FCEFAB51805D61600472CE4;
1201
			remoteInfo = llvmForJSC;
1202
		};
1184
		0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */ = {
1203
		0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */ = {
1185
			isa = PBXContainerItemProxy;
1204
			isa = PBXContainerItemProxy;
1186
			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
1205
			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
Lines 1598-1603 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec3
1598
		0FC815141405118D00CFA603 /* VTableSpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTableSpectrum.h; sourceTree = "<group>"; };
1617
		0FC815141405118D00CFA603 /* VTableSpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTableSpectrum.h; sourceTree = "<group>"; };
1599
		0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitorInlines.h; sourceTree = "<group>"; };
1618
		0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitorInlines.h; sourceTree = "<group>"; };
1600
		0FCCAE4316D0CF6E00D0C65B /* ParserError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserError.h; sourceTree = "<group>"; };
1619
		0FCCAE4316D0CF6E00D0C65B /* ParserError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserError.h; sourceTree = "<group>"; };
1620
		0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitializeLLVM.h; path = llvm/InitializeLLVM.h; sourceTree = "<group>"; };
1621
		0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InitializeLLVMMac.mm; path = llvm/InitializeLLVMMac.mm; sourceTree = "<group>"; };
1622
		0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libllvmForJSC.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
1623
		0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = LLVMForJSC.xcconfig; sourceTree = "<group>"; };
1624
		0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMOverrides.cpp; sourceTree = "<group>"; };
1625
		0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LLVMExports.cpp; sourceTree = "<group>"; };
1626
		0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitializeLLVM.cpp; path = llvm/InitializeLLVM.cpp; sourceTree = "<group>"; };
1627
		0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InitializeLLVMPOSIX.cpp; path = llvm/InitializeLLVMPOSIX.cpp; sourceTree = "<group>"; };
1628
		0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InitializeLLVMPOSIX.h; path = llvm/InitializeLLVMPOSIX.h; sourceTree = "<group>"; };
1629
		0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLVMAPI.cpp; path = llvm/LLVMAPI.cpp; sourceTree = "<group>"; };
1630
		0FCEFAC81805E75500472CE4 /* LLVMAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLVMAPI.h; path = llvm/LLVMAPI.h; sourceTree = "<group>"; };
1631
		0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLVMAPIFunctions.h; path = llvm/LLVMAPIFunctions.h; sourceTree = "<group>"; };
1601
		0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; };
1632
		0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; };
1602
		0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; };
1633
		0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; };
1603
		0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = "<group>"; };
1634
		0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = "<group>"; };
Lines 2431-2436 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec4
2431
/* End PBXFileReference section */
2462
/* End PBXFileReference section */
2432
2463
2433
/* Begin PBXFrameworksBuildPhase section */
2464
/* Begin PBXFrameworksBuildPhase section */
2465
		0FCEFAB31805D61600472CE4 /* Frameworks */ = {
2466
			isa = PBXFrameworksBuildPhase;
2467
			buildActionMask = 2147483647;
2468
			files = (
2469
			);
2470
			runOnlyForDeploymentPostprocessing = 0;
2471
		};
2434
		0FF922C614F46B130041A24E /* Frameworks */ = {
2472
		0FF922C614F46B130041A24E /* Frameworks */ = {
2435
			isa = PBXFrameworksBuildPhase;
2473
			isa = PBXFrameworksBuildPhase;
2436
			buildActionMask = 2147483647;
2474
			buildActionMask = 2147483647;
Lines 2499-2504 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec5
2499
				141211200A48793C00480255 /* minidom */,
2537
				141211200A48793C00480255 /* minidom */,
2500
				14BD59BF0A3E8F9000BAF59C /* testapi */,
2538
				14BD59BF0A3E8F9000BAF59C /* testapi */,
2501
				6511230514046A4C002B101D /* testRegExp */,
2539
				6511230514046A4C002B101D /* testRegExp */,
2540
				0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */,
2502
			);
2541
			);
2503
			name = Products;
2542
			name = Products;
2504
			sourceTree = "<group>";
2543
			sourceTree = "<group>";
Lines 2531-2536 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec6
2531
				1429D77A0ED20D7300B89619 /* interpreter */,
2570
				1429D77A0ED20D7300B89619 /* interpreter */,
2532
				1429D92C0ED22D7000B89619 /* jit */,
2571
				1429D92C0ED22D7000B89619 /* jit */,
2533
				0F46809C14BA7F4D00BFE272 /* llint */,
2572
				0F46809C14BA7F4D00BFE272 /* llint */,
2573
				0FCEFAAD1805CA4400472CE4 /* llvm */,
2534
				7E39D8370EC3A388003AF11A /* parser */,
2574
				7E39D8370EC3A388003AF11A /* parser */,
2535
				034768DFFF38A50411DB9C8B /* Products */,
2575
				034768DFFF38A50411DB9C8B /* Products */,
2536
				95AB831A0DA42C6900BC83F3 /* profiler */,
2576
				95AB831A0DA42C6900BC83F3 /* profiler */,
Lines 2588-2593 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec7
2588
			name = llint;
2628
			name = llint;
2589
			sourceTree = "<group>";
2629
			sourceTree = "<group>";
2590
		};
2630
		};
2631
		0FCEFAAD1805CA4400472CE4 /* llvm */ = {
2632
			isa = PBXGroup;
2633
			children = (
2634
				0FCEFABF1805D94100472CE4 /* library */,
2635
				0FCEFAC41805E75500472CE4 /* InitializeLLVM.cpp */,
2636
				0FCEFAAE1805CA6D00472CE4 /* InitializeLLVM.h */,
2637
				0FCEFAAF1805CA6D00472CE4 /* InitializeLLVMMac.mm */,
2638
				0FCEFAC51805E75500472CE4 /* InitializeLLVMPOSIX.cpp */,
2639
				0FCEFAC61805E75500472CE4 /* InitializeLLVMPOSIX.h */,
2640
				0FCEFAC71805E75500472CE4 /* LLVMAPI.cpp */,
2641
				0FCEFAC81805E75500472CE4 /* LLVMAPI.h */,
2642
				0FCEFAC91805E75500472CE4 /* LLVMAPIFunctions.h */,
2643
			);
2644
			name = llvm;
2645
			sourceTree = "<group>";
2646
		};
2647
		0FCEFABF1805D94100472CE4 /* library */ = {
2648
			isa = PBXGroup;
2649
			children = (
2650
				0FCEFAC21805E74000472CE4 /* LLVMExports.cpp */,
2651
				0FCEFAC01805D94100472CE4 /* LLVMOverrides.cpp */,
2652
			);
2653
			name = library;
2654
			path = llvm/library;
2655
			sourceTree = "<group>";
2656
		};
2591
		0FEA09FC1705137F00BB722C /* ftl */ = {
2657
		0FEA09FC1705137F00BB722C /* ftl */ = {
2592
			isa = PBXGroup;
2658
			isa = PBXGroup;
2593
			children = (
2659
			children = (
Lines 3008-3013 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec8
3008
		1C90513E0BA9E8830081E9D0 /* Configurations */ = {
3074
		1C90513E0BA9E8830081E9D0 /* Configurations */ = {
3009
			isa = PBXGroup;
3075
			isa = PBXGroup;
3010
			children = (
3076
			children = (
3077
				0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */,
3011
				1C9051450BA9E8A70081E9D0 /* Base.xcconfig */,
3078
				1C9051450BA9E8A70081E9D0 /* Base.xcconfig */,
3012
				1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */,
3079
				1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */,
3013
				449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */,
3080
				449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */,
Lines 3882-3887 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec9
3882
/* End PBXGroup section */
3949
/* End PBXGroup section */
3883
3950
3884
/* Begin PBXHeadersBuildPhase section */
3951
/* Begin PBXHeadersBuildPhase section */
3952
		0FCEFAB41805D61600472CE4 /* Headers */ = {
3953
			isa = PBXHeadersBuildPhase;
3954
			buildActionMask = 2147483647;
3955
			files = (
3956
				0FCEFAD11805E77900472CE4 /* LLVMAPIFunctions.h in Headers */,
3957
				0FCEFAD01805E77500472CE4 /* LLVMAPI.h in Headers */,
3958
			);
3959
			runOnlyForDeploymentPostprocessing = 0;
3960
		};
3885
		144005C70A5338C60005F061 /* Headers */ = {
3961
		144005C70A5338C60005F061 /* Headers */ = {
3886
			isa = PBXHeadersBuildPhase;
3962
			isa = PBXHeadersBuildPhase;
3887
			buildActionMask = 2147483647;
3963
			buildActionMask = 2147483647;
Lines 3970-3975 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec10
3970
				C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */,
4046
				C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */,
3971
				C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */,
4047
				C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */,
3972
				C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */,
4048
				C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */,
4049
				0FCEFACF1805E75500472CE4 /* LLVMAPIFunctions.h in Headers */,
3973
				5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
4050
				5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
3974
				0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */,
4051
				0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */,
3975
				0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */,
4052
				0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */,
Lines 4087-4092 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec11
4087
				86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */,
4164
				86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */,
4088
				A7D89D0017A0B8CC00773AD8 /* DFGSSAConversionPhase.h in Headers */,
4165
				A7D89D0017A0B8CC00773AD8 /* DFGSSAConversionPhase.h in Headers */,
4089
				0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */,
4166
				0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */,
4167
				0FCEFACC1805E75500472CE4 /* InitializeLLVMPOSIX.h in Headers */,
4090
				0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */,
4168
				0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */,
4091
				0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */,
4169
				0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */,
4092
				0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */,
4170
				0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */,
Lines 4193-4198 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec12
4193
				A78853FA17972629001440E4 /* IntendedStructureChain.h in Headers */,
4271
				A78853FA17972629001440E4 /* IntendedStructureChain.h in Headers */,
4194
				BC11667B0E199C05008066DD /* InternalFunction.h in Headers */,
4272
				BC11667B0E199C05008066DD /* InternalFunction.h in Headers */,
4195
				1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */,
4273
				1429D77C0ED20D7300B89619 /* Interpreter.h in Headers */,
4274
				0FCEFAB01805CA6D00472CE4 /* InitializeLLVM.h in Headers */,
4196
				860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
4275
				860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
4197
				BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */,
4276
				BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */,
4198
				BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */,
4277
				BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */,
Lines 4246-4251 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec13
4246
				A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */,
4325
				A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */,
4247
				0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */,
4326
				0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */,
4248
				0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */,
4327
				0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */,
4328
				0FCEFACE1805E75500472CE4 /* LLVMAPI.h in Headers */,
4249
				978801411471AD920041B016 /* JSDateMath.h in Headers */,
4329
				978801411471AD920041B016 /* JSDateMath.h in Headers */,
4250
				C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */,
4330
				C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */,
4251
				86E3C614167BABD7006D760A /* JSExport.h in Headers */,
4331
				86E3C614167BABD7006D760A /* JSExport.h in Headers */,
Lines 4563-4568 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec14
4563
/* End PBXHeadersBuildPhase section */
4643
/* End PBXHeadersBuildPhase section */
4564
4644
4565
/* Begin PBXNativeTarget section */
4645
/* Begin PBXNativeTarget section */
4646
		0FCEFAB51805D61600472CE4 /* llvmForJSC */ = {
4647
			isa = PBXNativeTarget;
4648
			buildConfigurationList = 0FCEFAB71805D61600472CE4 /* Build configuration list for PBXNativeTarget "llvmForJSC" */;
4649
			buildPhases = (
4650
				0FCEFAB21805D61600472CE4 /* Sources */,
4651
				0FCEFAB31805D61600472CE4 /* Frameworks */,
4652
				0FCEFAB41805D61600472CE4 /* Headers */,
4653
			);
4654
			buildRules = (
4655
			);
4656
			dependencies = (
4657
			);
4658
			name = llvmForJSC;
4659
			productName = llvmForJSC;
4660
			productReference = 0FCEFAB61805D61600472CE4 /* libllvmForJSC.dylib */;
4661
			productType = "com.apple.product-type.library.dynamic";
4662
		};
4566
		0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */ = {
4663
		0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */ = {
4567
			isa = PBXNativeTarget;
4664
			isa = PBXNativeTarget;
4568
			buildConfigurationList = 0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */;
4665
			buildConfigurationList = 0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */;
Lines 4650-4655 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec15
4650
			buildRules = (
4747
			buildRules = (
4651
			);
4748
			);
4652
			dependencies = (
4749
			dependencies = (
4750
				0FCEFABD1805D66300472CE4 /* PBXTargetDependency */,
4653
				65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
4751
				65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
4654
			);
4752
			);
4655
			name = JavaScriptCore;
4753
			name = JavaScriptCore;
Lines 4710-4715 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec16
4710
				0F4680A914BA7FD900BFE272 /* LLInt Offsets */,
4808
				0F4680A914BA7FD900BFE272 /* LLInt Offsets */,
4711
				0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */,
4809
				0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */,
4712
				5D6B2A47152B9E17005231DE /* Test Tools */,
4810
				5D6B2A47152B9E17005231DE /* Test Tools */,
4811
				0FCEFAB51805D61600472CE4 /* llvmForJSC */,
4713
			);
4812
			);
4714
		};
4813
		};
4715
/* End PBXProject section */
4814
/* End PBXProject section */
Lines 4875-4880 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec17
4875
/* End PBXShellScriptBuildPhase section */
4974
/* End PBXShellScriptBuildPhase section */
4876
4975
4877
/* Begin PBXSourcesBuildPhase section */
4976
/* Begin PBXSourcesBuildPhase section */
4977
		0FCEFAB21805D61600472CE4 /* Sources */ = {
4978
			isa = PBXSourcesBuildPhase;
4979
			buildActionMask = 2147483647;
4980
			files = (
4981
				0FCEFAC31805E74000472CE4 /* LLVMExports.cpp in Sources */,
4982
				0FCEFAC11805D94E00472CE4 /* LLVMOverrides.cpp in Sources */,
4983
			);
4984
			runOnlyForDeploymentPostprocessing = 0;
4985
		};
4878
		0FF922C414F46B130041A24E /* Sources */ = {
4986
		0FF922C414F46B130041A24E /* Sources */ = {
4879
			isa = PBXSourcesBuildPhase;
4987
			isa = PBXSourcesBuildPhase;
4880
			buildActionMask = 2147483647;
4988
			buildActionMask = 2147483647;
Lines 4935-4940 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec18
4935
				14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
5043
				14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
4936
				148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */,
5044
				148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */,
4937
				1428082D107EC0570013E7B2 /* CallData.cpp in Sources */,
5045
				1428082D107EC0570013E7B2 /* CallData.cpp in Sources */,
5046
				0FCEFAB11805CA6D00472CE4 /* InitializeLLVMMac.mm in Sources */,
4938
				1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */,
5047
				1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */,
4939
				0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */,
5048
				0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */,
4940
				0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */,
5049
				0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */,
Lines 5074-5079 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec19
5074
				0F235BD117178E1C00690C7F /* FTLCArgumentGetter.cpp in Sources */,
5183
				0F235BD117178E1C00690C7F /* FTLCArgumentGetter.cpp in Sources */,
5075
				0FEA0A271709623B00BB722C /* FTLCommonValues.cpp in Sources */,
5184
				0FEA0A271709623B00BB722C /* FTLCommonValues.cpp in Sources */,
5076
				0FEA0A0B170513DB00BB722C /* FTLCompile.cpp in Sources */,
5185
				0FEA0A0B170513DB00BB722C /* FTLCompile.cpp in Sources */,
5186
				0FCEFACD1805E75500472CE4 /* LLVMAPI.cpp in Sources */,
5077
				0F235BD317178E1C00690C7F /* FTLExitArgument.cpp in Sources */,
5187
				0F235BD317178E1C00690C7F /* FTLExitArgument.cpp in Sources */,
5078
				0F235BD517178E1C00690C7F /* FTLExitArgumentForOperand.cpp in Sources */,
5188
				0F235BD517178E1C00690C7F /* FTLExitArgumentForOperand.cpp in Sources */,
5079
				0F235BD817178E1C00690C7F /* FTLExitThunkGenerator.cpp in Sources */,
5189
				0F235BD817178E1C00690C7F /* FTLExitThunkGenerator.cpp in Sources */,
Lines 5091-5096 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec20
5091
				0F235BE117178E1C00690C7F /* FTLThunks.cpp in Sources */,
5201
				0F235BE117178E1C00690C7F /* FTLThunks.cpp in Sources */,
5092
				0F235BE317178E1C00690C7F /* FTLValueFormat.cpp in Sources */,
5202
				0F235BE317178E1C00690C7F /* FTLValueFormat.cpp in Sources */,
5093
				0F235BE517178E1C00690C7F /* FTLValueSource.cpp in Sources */,
5203
				0F235BE517178E1C00690C7F /* FTLValueSource.cpp in Sources */,
5204
				0FCEFACA1805E75500472CE4 /* InitializeLLVM.cpp in Sources */,
5094
				147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */,
5205
				147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */,
5095
				0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */,
5206
				0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */,
5096
				147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */,
5207
				147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */,
Lines 5258-5263 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec21
5258
				95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */,
5369
				95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */,
5259
				0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */,
5370
				0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */,
5260
				0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */,
5371
				0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */,
5372
				0FCEFACB1805E75500472CE4 /* InitializeLLVMPOSIX.cpp in Sources */,
5261
				0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */,
5373
				0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */,
5262
				0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */,
5374
				0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */,
5263
				0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */,
5375
				0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */,
Lines 5360-5365 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec22
5360
/* End PBXSourcesBuildPhase section */
5472
/* End PBXSourcesBuildPhase section */
5361
5473
5362
/* Begin PBXTargetDependency section */
5474
/* Begin PBXTargetDependency section */
5475
		0FCEFABD1805D66300472CE4 /* PBXTargetDependency */ = {
5476
			isa = PBXTargetDependency;
5477
			target = 0FCEFAB51805D61600472CE4 /* llvmForJSC */;
5478
			targetProxy = 0FCEFABC1805D66300472CE4 /* PBXContainerItemProxy */;
5479
		};
5363
		0FF922D314F46B2F0041A24E /* PBXTargetDependency */ = {
5480
		0FF922D314F46B2F0041A24E /* PBXTargetDependency */ = {
5364
			isa = PBXTargetDependency;
5481
			isa = PBXTargetDependency;
5365
			target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */;
5482
			target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */;
Lines 5436-5441 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec23
5436
			};
5553
			};
5437
			name = Production;
5554
			name = Production;
5438
		};
5555
		};
5556
		0FCEFAB81805D61600472CE4 /* Debug */ = {
5557
			isa = XCBuildConfiguration;
5558
			baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */;
5559
			buildSettings = {
5560
				ALWAYS_SEARCH_USER_PATHS = NO;
5561
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
5562
				CLANG_CXX_LIBRARY = "libc++";
5563
				CLANG_ENABLE_MODULES = YES;
5564
				CLANG_ENABLE_OBJC_ARC = YES;
5565
				CLANG_WARN_BOOL_CONVERSION = YES;
5566
				CLANG_WARN_CONSTANT_CONVERSION = YES;
5567
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
5568
				CLANG_WARN_EMPTY_BODY = YES;
5569
				CLANG_WARN_ENUM_CONVERSION = YES;
5570
				CLANG_WARN_INT_CONVERSION = YES;
5571
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
5572
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5573
				COPY_PHASE_STRIP = NO;
5574
				EXECUTABLE_PREFIX = lib;
5575
				GCC_C_LANGUAGE_STANDARD = gnu99;
5576
				GCC_DYNAMIC_NO_PIC = NO;
5577
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
5578
				GCC_OPTIMIZATION_LEVEL = 0;
5579
				GCC_PREPROCESSOR_DEFINITIONS = (
5580
					"DEBUG=1",
5581
					"$(inherited)",
5582
				);
5583
				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
5584
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
5585
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
5586
				GCC_WARN_UNDECLARED_SELECTOR = YES;
5587
				GCC_WARN_UNINITIALIZED_AUTOS = YES;
5588
				GCC_WARN_UNUSED_FUNCTION = YES;
5589
				GCC_WARN_UNUSED_VARIABLE = YES;
5590
				MACOSX_DEPLOYMENT_TARGET = 10.9;
5591
				ONLY_ACTIVE_ARCH = YES;
5592
				PRODUCT_NAME = "$(TARGET_NAME)";
5593
				SDKROOT = macosx;
5594
			};
5595
			name = Debug;
5596
		};
5597
		0FCEFAB91805D61600472CE4 /* Release */ = {
5598
			isa = XCBuildConfiguration;
5599
			baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */;
5600
			buildSettings = {
5601
				ALWAYS_SEARCH_USER_PATHS = NO;
5602
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
5603
				CLANG_CXX_LIBRARY = "libc++";
5604
				CLANG_ENABLE_MODULES = YES;
5605
				CLANG_ENABLE_OBJC_ARC = YES;
5606
				CLANG_WARN_BOOL_CONVERSION = YES;
5607
				CLANG_WARN_CONSTANT_CONVERSION = YES;
5608
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
5609
				CLANG_WARN_EMPTY_BODY = YES;
5610
				CLANG_WARN_ENUM_CONVERSION = YES;
5611
				CLANG_WARN_INT_CONVERSION = YES;
5612
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
5613
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5614
				COPY_PHASE_STRIP = YES;
5615
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
5616
				ENABLE_NS_ASSERTIONS = NO;
5617
				EXECUTABLE_PREFIX = lib;
5618
				GCC_C_LANGUAGE_STANDARD = gnu99;
5619
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
5620
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
5621
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
5622
				GCC_WARN_UNDECLARED_SELECTOR = YES;
5623
				GCC_WARN_UNINITIALIZED_AUTOS = YES;
5624
				GCC_WARN_UNUSED_FUNCTION = YES;
5625
				GCC_WARN_UNUSED_VARIABLE = YES;
5626
				MACOSX_DEPLOYMENT_TARGET = 10.9;
5627
				PRODUCT_NAME = "$(TARGET_NAME)";
5628
				SDKROOT = macosx;
5629
			};
5630
			name = Release;
5631
		};
5632
		0FCEFABA1805D61600472CE4 /* Profiling */ = {
5633
			isa = XCBuildConfiguration;
5634
			baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */;
5635
			buildSettings = {
5636
				ALWAYS_SEARCH_USER_PATHS = NO;
5637
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
5638
				CLANG_CXX_LIBRARY = "libc++";
5639
				CLANG_ENABLE_MODULES = YES;
5640
				CLANG_ENABLE_OBJC_ARC = YES;
5641
				CLANG_WARN_BOOL_CONVERSION = YES;
5642
				CLANG_WARN_CONSTANT_CONVERSION = YES;
5643
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
5644
				CLANG_WARN_EMPTY_BODY = YES;
5645
				CLANG_WARN_ENUM_CONVERSION = YES;
5646
				CLANG_WARN_INT_CONVERSION = YES;
5647
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
5648
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5649
				COPY_PHASE_STRIP = YES;
5650
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
5651
				ENABLE_NS_ASSERTIONS = NO;
5652
				EXECUTABLE_PREFIX = lib;
5653
				GCC_C_LANGUAGE_STANDARD = gnu99;
5654
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
5655
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
5656
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
5657
				GCC_WARN_UNDECLARED_SELECTOR = YES;
5658
				GCC_WARN_UNINITIALIZED_AUTOS = YES;
5659
				GCC_WARN_UNUSED_FUNCTION = YES;
5660
				GCC_WARN_UNUSED_VARIABLE = YES;
5661
				MACOSX_DEPLOYMENT_TARGET = 10.9;
5662
				PRODUCT_NAME = "$(TARGET_NAME)";
5663
				SDKROOT = macosx;
5664
			};
5665
			name = Profiling;
5666
		};
5667
		0FCEFABB1805D61600472CE4 /* Production */ = {
5668
			isa = XCBuildConfiguration;
5669
			baseConfigurationReference = 0FCEFABE1805D86900472CE4 /* LLVMForJSC.xcconfig */;
5670
			buildSettings = {
5671
				ALWAYS_SEARCH_USER_PATHS = NO;
5672
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
5673
				CLANG_CXX_LIBRARY = "libc++";
5674
				CLANG_ENABLE_MODULES = YES;
5675
				CLANG_ENABLE_OBJC_ARC = YES;
5676
				CLANG_WARN_BOOL_CONVERSION = YES;
5677
				CLANG_WARN_CONSTANT_CONVERSION = YES;
5678
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
5679
				CLANG_WARN_EMPTY_BODY = YES;
5680
				CLANG_WARN_ENUM_CONVERSION = YES;
5681
				CLANG_WARN_INT_CONVERSION = YES;
5682
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
5683
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
5684
				COPY_PHASE_STRIP = YES;
5685
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
5686
				ENABLE_NS_ASSERTIONS = NO;
5687
				EXECUTABLE_PREFIX = lib;
5688
				GCC_C_LANGUAGE_STANDARD = gnu99;
5689
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
5690
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
5691
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
5692
				GCC_WARN_UNDECLARED_SELECTOR = YES;
5693
				GCC_WARN_UNINITIALIZED_AUTOS = YES;
5694
				GCC_WARN_UNUSED_FUNCTION = YES;
5695
				GCC_WARN_UNUSED_VARIABLE = YES;
5696
				MACOSX_DEPLOYMENT_TARGET = 10.9;
5697
				PRODUCT_NAME = "$(TARGET_NAME)";
5698
				SDKROOT = macosx;
5699
			};
5700
			name = Production;
5701
		};
5439
		0FF922CB14F46B130041A24E /* Debug */ = {
5702
		0FF922CB14F46B130041A24E /* Debug */ = {
5440
			isa = XCBuildConfiguration;
5703
			isa = XCBuildConfiguration;
5441
			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
5704
			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
Lines 5740-5745 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj_sec24
5740
			defaultConfigurationIsVisible = 0;
6003
			defaultConfigurationIsVisible = 0;
5741
			defaultConfigurationName = Production;
6004
			defaultConfigurationName = Production;
5742
		};
6005
		};
6006
		0FCEFAB71805D61600472CE4 /* Build configuration list for PBXNativeTarget "llvmForJSC" */ = {
6007
			isa = XCConfigurationList;
6008
			buildConfigurations = (
6009
				0FCEFAB81805D61600472CE4 /* Debug */,
6010
				0FCEFAB91805D61600472CE4 /* Release */,
6011
				0FCEFABA1805D61600472CE4 /* Profiling */,
6012
				0FCEFABB1805D61600472CE4 /* Production */,
6013
			);
6014
			defaultConfigurationIsVisible = 0;
6015
		};
5743
		0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */ = {
6016
		0FF922CA14F46B130041A24E /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */ = {
5744
			isa = XCConfigurationList;
6017
			isa = XCConfigurationList;
5745
			buildConfigurations = (
6018
			buildConfigurations = (
- Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp -3 / +4 lines
Lines 29-34 Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp_sec1
29
#if USE(LLVM_DISASSEMBLER)
29
#if USE(LLVM_DISASSEMBLER)
30
30
31
#include "MacroAssemblerCodeRef.h"
31
#include "MacroAssemblerCodeRef.h"
32
#include "LLVMAPI.h"
32
#include <wtf/LLVMHeaders.h>
33
#include <wtf/LLVMHeaders.h>
33
34
34
namespace JSC {
35
namespace JSC {
Lines 91-97 bool tryToDisassembleWithLLVM( Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp_sec2
91
    char symbolString[symbolStringSize];
92
    char symbolString[symbolStringSize];
92
    
93
    
93
    LLVMDisasmContextRef disassemblyContext =
94
    LLVMDisasmContextRef disassemblyContext =
94
        LLVMCreateDisasm(triple, symbolString, 0, 0, symbolLookupCallback);
95
        llvm->CreateDisasm(triple, symbolString, 0, 0, symbolLookupCallback);
95
    RELEASE_ASSERT(disassemblyContext);
96
    RELEASE_ASSERT(disassemblyContext);
96
    
97
    
97
    char pcString[20];
98
    char pcString[20];
Lines 105-111 bool tryToDisassembleWithLLVM( Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp_sec3
105
            pcString, sizeof(pcString), "0x%lx",
106
            pcString, sizeof(pcString), "0x%lx",
106
            static_cast<unsigned long>(bitwise_cast<uintptr_t>(pc)));
107
            static_cast<unsigned long>(bitwise_cast<uintptr_t>(pc)));
107
108
108
        size_t instructionSize = LLVMDisasmInstruction(
109
        size_t instructionSize = llvm->DisasmInstruction(
109
            disassemblyContext, pc, end - pc, bitwise_cast<uintptr_t>(pc),
110
            disassemblyContext, pc, end - pc, bitwise_cast<uintptr_t>(pc),
110
            instructionString, sizeof(instructionString));
111
            instructionString, sizeof(instructionString));
111
        
112
        
Lines 117-123 bool tryToDisassembleWithLLVM( Source/JavaScriptCore/disassembler/LLVMDisassembler.cpp_sec4
117
        out.printf("%s%16s: %s\n", prefix, pcString, instructionString);
118
        out.printf("%s%16s: %s\n", prefix, pcString, instructionString);
118
    }
119
    }
119
    
120
    
120
    LLVMDisasmDispose(disassemblyContext);
121
    llvm->DisasmDispose(disassemblyContext);
121
    
122
    
122
    return true;
123
    return true;
123
}
124
}
- Source/JavaScriptCore/ftl/FTLAbbreviations.h -77 / +78 lines
Lines 33-38 Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec1
33
#include "FTLAbbreviatedTypes.h"
33
#include "FTLAbbreviatedTypes.h"
34
#include "FTLSwitchCase.h"
34
#include "FTLSwitchCase.h"
35
#include "FTLValueFromBlock.h"
35
#include "FTLValueFromBlock.h"
36
#include "LLVMAPI.h"
36
#include <cstring>
37
#include <cstring>
37
38
38
namespace JSC { namespace FTL {
39
namespace JSC { namespace FTL {
Lines 46-67 namespace JSC { namespace FTL { Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec2
46
#error "The FTL backend assumes that pointers are 64-bit."
47
#error "The FTL backend assumes that pointers are 64-bit."
47
#endif
48
#endif
48
49
49
static inline LType voidType(LContext context) { return LLVMVoidTypeInContext(context); }
50
static inline LType voidType(LContext context) { return llvm->VoidTypeInContext(context); }
50
static inline LType int1Type(LContext context) { return LLVMInt1TypeInContext(context); }
51
static inline LType int1Type(LContext context) { return llvm->Int1TypeInContext(context); }
51
static inline LType int8Type(LContext context) { return LLVMInt8TypeInContext(context); }
52
static inline LType int8Type(LContext context) { return llvm->Int8TypeInContext(context); }
52
static inline LType int16Type(LContext context) { return LLVMInt16TypeInContext(context); }
53
static inline LType int16Type(LContext context) { return llvm->Int16TypeInContext(context); }
53
static inline LType int32Type(LContext context) { return LLVMInt32TypeInContext(context); }
54
static inline LType int32Type(LContext context) { return llvm->Int32TypeInContext(context); }
54
static inline LType int64Type(LContext context) { return LLVMInt64TypeInContext(context); }
55
static inline LType int64Type(LContext context) { return llvm->Int64TypeInContext(context); }
55
static inline LType intPtrType(LContext context) { return LLVMInt64TypeInContext(context); }
56
static inline LType intPtrType(LContext context) { return llvm->Int64TypeInContext(context); }
56
static inline LType floatType(LContext context) { return LLVMFloatTypeInContext(context); }
57
static inline LType floatType(LContext context) { return llvm->FloatTypeInContext(context); }
57
static inline LType doubleType(LContext context) { return LLVMDoubleTypeInContext(context); }
58
static inline LType doubleType(LContext context) { return llvm->DoubleTypeInContext(context); }
58
59
59
static inline LType pointerType(LType type) { return LLVMPointerType(type, 0); }
60
static inline LType pointerType(LType type) { return llvm->PointerType(type, 0); }
60
61
61
enum PackingMode { NotPacked, Packed };
62
enum PackingMode { NotPacked, Packed };
62
static inline LType structType(LContext context, LType* elementTypes, unsigned elementCount, PackingMode packing = NotPacked)
63
static inline LType structType(LContext context, LType* elementTypes, unsigned elementCount, PackingMode packing = NotPacked)
63
{
64
{
64
    return LLVMStructTypeInContext(context, elementTypes, elementCount, packing == Packed);
65
    return llvm->StructTypeInContext(context, elementTypes, elementCount, packing == Packed);
65
}
66
}
66
static inline LType structType(LContext context, PackingMode packing = NotPacked)
67
static inline LType structType(LContext context, PackingMode packing = NotPacked)
67
{
68
{
Lines 80-86 static inline LType structType(LContext Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec3
80
enum Variadicity { NotVariadic, Variadic };
81
enum Variadicity { NotVariadic, Variadic };
81
static inline LType functionType(LType returnType, const LType* paramTypes, unsigned paramCount, Variadicity variadicity)
82
static inline LType functionType(LType returnType, const LType* paramTypes, unsigned paramCount, Variadicity variadicity)
82
{
83
{
83
    return LLVMFunctionType(returnType, const_cast<LType*>(paramTypes), paramCount, variadicity == Variadic);
84
    return llvm->FunctionType(returnType, const_cast<LType*>(paramTypes), paramCount, variadicity == Variadic);
84
}
85
}
85
template<typename VectorType>
86
template<typename VectorType>
86
inline LType functionType(LType returnType, const VectorType& vector, Variadicity variadicity = NotVariadic)
87
inline LType functionType(LType returnType, const VectorType& vector, Variadicity variadicity = NotVariadic)
Lines 111-122 static inline LType functionType(LType r Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec4
111
    return functionType(returnType, paramTypes, 4, variadicity);
112
    return functionType(returnType, paramTypes, 4, variadicity);
112
}
113
}
113
114
114
static inline LType typeOf(LValue value) { return LLVMTypeOf(value); }
115
static inline LType typeOf(LValue value) { return llvm->TypeOf(value); }
115
116
116
static inline unsigned mdKindID(LContext context, const char* string) { return LLVMGetMDKindIDInContext(context, string, std::strlen(string)); }
117
static inline unsigned mdKindID(LContext context, const char* string) { return llvm->GetMDKindIDInContext(context, string, std::strlen(string)); }
117
static inline LValue mdString(LContext context, const char* string, unsigned length) { return LLVMMDStringInContext(context, string, length); }
118
static inline LValue mdString(LContext context, const char* string, unsigned length) { return llvm->MDStringInContext(context, string, length); }
118
static inline LValue mdString(LContext context, const char* string) { return mdString(context, string, std::strlen(string)); }
119
static inline LValue mdString(LContext context, const char* string) { return mdString(context, string, std::strlen(string)); }
119
static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return LLVMMDNodeInContext(context, args, numArgs); }
120
static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return llvm->MDNodeInContext(context, args, numArgs); }
120
static inline LValue mdNode(LContext context) { return mdNode(context, 0, 0); }
121
static inline LValue mdNode(LContext context) { return mdNode(context, 0, 0); }
121
static inline LValue mdNode(LContext context, LValue arg1) { return mdNode(context, &arg1, 1); }
122
static inline LValue mdNode(LContext context, LValue arg1) { return mdNode(context, &arg1, 1); }
122
static inline LValue mdNode(LContext context, LValue arg1, LValue arg2)
123
static inline LValue mdNode(LContext context, LValue arg1, LValue arg2)
Lines 125-135 static inline LValue mdNode(LContext con Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec5
125
    return mdNode(context, args, 2);
126
    return mdNode(context, args, 2);
126
}
127
}
127
128
128
static inline void setMetadata(LValue instruction, unsigned kind, LValue metadata) { LLVMSetMetadata(instruction, kind, metadata); }
129
static inline void setMetadata(LValue instruction, unsigned kind, LValue metadata) { llvm->SetMetadata(instruction, kind, metadata); }
129
130
130
static inline LValue addFunction(LModule module, const char* name, LType type) { return LLVMAddFunction(module, name, type); }
131
static inline LValue addFunction(LModule module, const char* name, LType type) { return llvm->AddFunction(module, name, type); }
131
static inline void setLinkage(LValue global, LLinkage linkage) { LLVMSetLinkage(global, linkage); }
132
static inline void setLinkage(LValue global, LLinkage linkage) { llvm->SetLinkage(global, linkage); }
132
static inline void setFunctionCallingConv(LValue function, LCallConv convention) { LLVMSetFunctionCallConv(function, convention); }
133
static inline void setFunctionCallingConv(LValue function, LCallConv convention) { llvm->SetFunctionCallConv(function, convention); }
133
134
134
static inline LValue addExternFunction(LModule module, const char* name, LType type)
135
static inline LValue addExternFunction(LModule module, const char* name, LType type)
135
{
136
{
Lines 138-158 static inline LValue addExternFunction(L Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec6
138
    return result;
139
    return result;
139
}
140
}
140
141
141
static inline LValue getParam(LValue function, unsigned index) { return LLVMGetParam(function, index); }
142
static inline LValue getParam(LValue function, unsigned index) { return llvm->GetParam(function, index); }
142
143
143
enum BitExtension { ZeroExtend, SignExtend };
144
enum BitExtension { ZeroExtend, SignExtend };
144
static inline LValue constInt(LType type, unsigned long long value, BitExtension extension = ZeroExtend) { return LLVMConstInt(type, value, extension == SignExtend); }
145
static inline LValue constInt(LType type, unsigned long long value, BitExtension extension = ZeroExtend) { return llvm->ConstInt(type, value, extension == SignExtend); }
145
static inline LValue constReal(LType type, double value) { return LLVMConstReal(type, value); }
146
static inline LValue constReal(LType type, double value) { return llvm->ConstReal(type, value); }
146
static inline LValue constIntToPtr(LValue value, LType type) { return LLVMConstIntToPtr(value, type); }
147
static inline LValue constIntToPtr(LValue value, LType type) { return llvm->ConstIntToPtr(value, type); }
147
static inline LValue constBitCast(LValue value, LType type) { return LLVMConstBitCast(value, type); }
148
static inline LValue constBitCast(LValue value, LType type) { return llvm->ConstBitCast(value, type); }
148
149
149
static inline LBasicBlock appendBasicBlock(LContext context, LValue function, const char* name = "") { return LLVMAppendBasicBlockInContext(context, function, name); }
150
static inline LBasicBlock appendBasicBlock(LContext context, LValue function, const char* name = "") { return llvm->AppendBasicBlockInContext(context, function, name); }
150
static inline LBasicBlock insertBasicBlock(LContext context, LBasicBlock beforeBasicBlock, const char* name = "") { return LLVMInsertBasicBlockInContext(context, beforeBasicBlock, name); }
151
static inline LBasicBlock insertBasicBlock(LContext context, LBasicBlock beforeBasicBlock, const char* name = "") { return llvm->InsertBasicBlockInContext(context, beforeBasicBlock, name); }
151
152
152
static inline LValue buildPhi(LBuilder builder, LType type) { return LLVMBuildPhi(builder, type, ""); }
153
static inline LValue buildPhi(LBuilder builder, LType type) { return llvm->BuildPhi(builder, type, ""); }
153
static inline void addIncoming(LValue phi, const LValue* values, const LBasicBlock* blocks, unsigned numPredecessors)
154
static inline void addIncoming(LValue phi, const LValue* values, const LBasicBlock* blocks, unsigned numPredecessors)
154
{
155
{
155
    LLVMAddIncoming(phi, const_cast<LValue*>(values), const_cast<LBasicBlock*>(blocks), numPredecessors);
156
    llvm->AddIncoming(phi, const_cast<LValue*>(values), const_cast<LBasicBlock*>(blocks), numPredecessors);
156
}
157
}
157
static inline void addIncoming(LValue phi, ValueFromBlock value1)
158
static inline void addIncoming(LValue phi, ValueFromBlock value1)
158
{
159
{
Lines 180-223 static inline LValue buildPhi( Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec7
180
    return result;
181
    return result;
181
}
182
}
182
183
183
static inline LValue buildAlloca(LBuilder builder, LType type) { return LLVMBuildAlloca(builder, type, ""); }
184
static inline LValue buildAlloca(LBuilder builder, LType type) { return llvm->BuildAlloca(builder, type, ""); }
184
static inline LValue buildAdd(LBuilder builder, LValue left, LValue right) { return LLVMBuildAdd(builder, left, right, ""); }
185
static inline LValue buildAdd(LBuilder builder, LValue left, LValue right) { return llvm->BuildAdd(builder, left, right, ""); }
185
static inline LValue buildSub(LBuilder builder, LValue left, LValue right) { return LLVMBuildSub(builder, left, right, ""); }
186
static inline LValue buildSub(LBuilder builder, LValue left, LValue right) { return llvm->BuildSub(builder, left, right, ""); }
186
static inline LValue buildMul(LBuilder builder, LValue left, LValue right) { return LLVMBuildMul(builder, left, right, ""); }
187
static inline LValue buildMul(LBuilder builder, LValue left, LValue right) { return llvm->BuildMul(builder, left, right, ""); }
187
static inline LValue buildDiv(LBuilder builder, LValue left, LValue right) { return LLVMBuildSDiv(builder, left, right, ""); }
188
static inline LValue buildDiv(LBuilder builder, LValue left, LValue right) { return llvm->BuildSDiv(builder, left, right, ""); }
188
static inline LValue buildRem(LBuilder builder, LValue left, LValue right) { return LLVMBuildSRem(builder, left, right, ""); }
189
static inline LValue buildRem(LBuilder builder, LValue left, LValue right) { return llvm->BuildSRem(builder, left, right, ""); }
189
static inline LValue buildNeg(LBuilder builder, LValue value) { return LLVMBuildNeg(builder, value, ""); }
190
static inline LValue buildNeg(LBuilder builder, LValue value) { return llvm->BuildNeg(builder, value, ""); }
190
static inline LValue buildFAdd(LBuilder builder, LValue left, LValue right) { return LLVMBuildFAdd(builder, left, right, ""); }
191
static inline LValue buildFAdd(LBuilder builder, LValue left, LValue right) { return llvm->BuildFAdd(builder, left, right, ""); }
191
static inline LValue buildFSub(LBuilder builder, LValue left, LValue right) { return LLVMBuildFSub(builder, left, right, ""); }
192
static inline LValue buildFSub(LBuilder builder, LValue left, LValue right) { return llvm->BuildFSub(builder, left, right, ""); }
192
static inline LValue buildFMul(LBuilder builder, LValue left, LValue right) { return LLVMBuildFMul(builder, left, right, ""); }
193
static inline LValue buildFMul(LBuilder builder, LValue left, LValue right) { return llvm->BuildFMul(builder, left, right, ""); }
193
static inline LValue buildFDiv(LBuilder builder, LValue left, LValue right) { return LLVMBuildFDiv(builder, left, right, ""); }
194
static inline LValue buildFDiv(LBuilder builder, LValue left, LValue right) { return llvm->BuildFDiv(builder, left, right, ""); }
194
static inline LValue buildFRem(LBuilder builder, LValue left, LValue right) { return LLVMBuildFRem(builder, left, right, ""); }
195
static inline LValue buildFRem(LBuilder builder, LValue left, LValue right) { return llvm->BuildFRem(builder, left, right, ""); }
195
static inline LValue buildFNeg(LBuilder builder, LValue value) { return LLVMBuildFNeg(builder, value, ""); }
196
static inline LValue buildFNeg(LBuilder builder, LValue value) { return llvm->BuildFNeg(builder, value, ""); }
196
static inline LValue buildAnd(LBuilder builder, LValue left, LValue right) { return LLVMBuildAnd(builder, left, right, ""); }
197
static inline LValue buildAnd(LBuilder builder, LValue left, LValue right) { return llvm->BuildAnd(builder, left, right, ""); }
197
static inline LValue buildOr(LBuilder builder, LValue left, LValue right) { return LLVMBuildOr(builder, left, right, ""); }
198
static inline LValue buildOr(LBuilder builder, LValue left, LValue right) { return llvm->BuildOr(builder, left, right, ""); }
198
static inline LValue buildXor(LBuilder builder, LValue left, LValue right) { return LLVMBuildXor(builder, left, right, ""); }
199
static inline LValue buildXor(LBuilder builder, LValue left, LValue right) { return llvm->BuildXor(builder, left, right, ""); }
199
static inline LValue buildShl(LBuilder builder, LValue left, LValue right) { return LLVMBuildShl(builder, left, right, ""); }
200
static inline LValue buildShl(LBuilder builder, LValue left, LValue right) { return llvm->BuildShl(builder, left, right, ""); }
200
static inline LValue buildAShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildAShr(builder, left, right, ""); }
201
static inline LValue buildAShr(LBuilder builder, LValue left, LValue right) { return llvm->BuildAShr(builder, left, right, ""); }
201
static inline LValue buildLShr(LBuilder builder, LValue left, LValue right) { return LLVMBuildLShr(builder, left, right, ""); }
202
static inline LValue buildLShr(LBuilder builder, LValue left, LValue right) { return llvm->BuildLShr(builder, left, right, ""); }
202
static inline LValue buildNot(LBuilder builder, LValue value) { return LLVMBuildNot(builder, value, ""); }
203
static inline LValue buildNot(LBuilder builder, LValue value) { return llvm->BuildNot(builder, value, ""); }
203
static inline LValue buildLoad(LBuilder builder, LValue pointer) { return LLVMBuildLoad(builder, pointer, ""); }
204
static inline LValue buildLoad(LBuilder builder, LValue pointer) { return llvm->BuildLoad(builder, pointer, ""); }
204
static inline LValue buildStore(LBuilder builder, LValue value, LValue pointer) { return LLVMBuildStore(builder, value, pointer); }
205
static inline LValue buildStore(LBuilder builder, LValue value, LValue pointer) { return llvm->BuildStore(builder, value, pointer); }
205
static inline LValue buildSExt(LBuilder builder, LValue value, LType type) { return LLVMBuildSExt(builder, value, type, ""); }
206
static inline LValue buildSExt(LBuilder builder, LValue value, LType type) { return llvm->BuildSExt(builder, value, type, ""); }
206
static inline LValue buildZExt(LBuilder builder, LValue value, LType type) { return LLVMBuildZExt(builder, value, type, ""); }
207
static inline LValue buildZExt(LBuilder builder, LValue value, LType type) { return llvm->BuildZExt(builder, value, type, ""); }
207
static inline LValue buildFPToSI(LBuilder builder, LValue value, LType type) { return LLVMBuildFPToSI(builder, value, type, ""); }
208
static inline LValue buildFPToSI(LBuilder builder, LValue value, LType type) { return llvm->BuildFPToSI(builder, value, type, ""); }
208
static inline LValue buildFPToUI(LBuilder builder, LValue value, LType type) { return LLVMBuildFPToUI(builder, value, type, ""); }
209
static inline LValue buildFPToUI(LBuilder builder, LValue value, LType type) { return llvm->BuildFPToUI(builder, value, type, ""); }
209
static inline LValue buildSIToFP(LBuilder builder, LValue value, LType type) { return LLVMBuildSIToFP(builder, value, type, ""); }
210
static inline LValue buildSIToFP(LBuilder builder, LValue value, LType type) { return llvm->BuildSIToFP(builder, value, type, ""); }
210
static inline LValue buildUIToFP(LBuilder builder, LValue value, LType type) { return LLVMBuildUIToFP(builder, value, type, ""); }
211
static inline LValue buildUIToFP(LBuilder builder, LValue value, LType type) { return llvm->BuildUIToFP(builder, value, type, ""); }
211
static inline LValue buildIntCast(LBuilder builder, LValue value, LType type) { return LLVMBuildIntCast(builder, value, type, ""); }
212
static inline LValue buildIntCast(LBuilder builder, LValue value, LType type) { return llvm->BuildIntCast(builder, value, type, ""); }
212
static inline LValue buildFPCast(LBuilder builder, LValue value, LType type) { return LLVMBuildFPCast(builder, value, type, ""); }
213
static inline LValue buildFPCast(LBuilder builder, LValue value, LType type) { return llvm->BuildFPCast(builder, value, type, ""); }
213
static inline LValue buildIntToPtr(LBuilder builder, LValue value, LType type) { return LLVMBuildIntToPtr(builder, value, type, ""); }
214
static inline LValue buildIntToPtr(LBuilder builder, LValue value, LType type) { return llvm->BuildIntToPtr(builder, value, type, ""); }
214
static inline LValue buildPtrToInt(LBuilder builder, LValue value, LType type) { return LLVMBuildPtrToInt(builder, value, type, ""); }
215
static inline LValue buildPtrToInt(LBuilder builder, LValue value, LType type) { return llvm->BuildPtrToInt(builder, value, type, ""); }
215
static inline LValue buildBitCast(LBuilder builder, LValue value, LType type) { return LLVMBuildBitCast(builder, value, type, ""); }
216
static inline LValue buildBitCast(LBuilder builder, LValue value, LType type) { return llvm->BuildBitCast(builder, value, type, ""); }
216
static inline LValue buildICmp(LBuilder builder, LIntPredicate cond, LValue left, LValue right) { return LLVMBuildICmp(builder, cond, left, right, ""); }
217
static inline LValue buildICmp(LBuilder builder, LIntPredicate cond, LValue left, LValue right) { return llvm->BuildICmp(builder, cond, left, right, ""); }
217
static inline LValue buildFCmp(LBuilder builder, LRealPredicate cond, LValue left, LValue right) { return LLVMBuildFCmp(builder, cond, left, right, ""); }
218
static inline LValue buildFCmp(LBuilder builder, LRealPredicate cond, LValue left, LValue right) { return llvm->BuildFCmp(builder, cond, left, right, ""); }
218
static inline LValue buildCall(LBuilder builder, LValue function, const LValue* args, unsigned numArgs)
219
static inline LValue buildCall(LBuilder builder, LValue function, const LValue* args, unsigned numArgs)
219
{
220
{
220
    return LLVMBuildCall(builder, function, const_cast<LValue*>(args), numArgs, "");
221
    return llvm->BuildCall(builder, function, const_cast<LValue*>(args), numArgs, "");
221
}
222
}
222
template<typename VectorType>
223
template<typename VectorType>
223
inline LValue buildCall(LBuilder builder, LValue function, const VectorType& vector)
224
inline LValue buildCall(LBuilder builder, LValue function, const VectorType& vector)
Lines 248-260 static inline LValue buildCall(LBuilder Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec8
248
    return buildCall(builder, function, args, 4);
249
    return buildCall(builder, function, args, 4);
249
}
250
}
250
enum TailCallMode { IsNotTailCall, IsTailCall };
251
enum TailCallMode { IsNotTailCall, IsTailCall };
251
static inline void setTailCall(LValue call, TailCallMode mode) { LLVMSetTailCall(call, mode == IsTailCall); }
252
static inline void setTailCall(LValue call, TailCallMode mode) { llvm->SetTailCall(call, mode == IsTailCall); }
252
static inline LValue buildExtractValue(LBuilder builder, LValue aggVal, unsigned index) { return LLVMBuildExtractValue(builder, aggVal, index, ""); }
253
static inline LValue buildExtractValue(LBuilder builder, LValue aggVal, unsigned index) { return llvm->BuildExtractValue(builder, aggVal, index, ""); }
253
static inline LValue buildSelect(LBuilder builder, LValue condition, LValue taken, LValue notTaken) { return LLVMBuildSelect(builder, condition, taken, notTaken, ""); }
254
static inline LValue buildSelect(LBuilder builder, LValue condition, LValue taken, LValue notTaken) { return llvm->BuildSelect(builder, condition, taken, notTaken, ""); }
254
static inline LValue buildBr(LBuilder builder, LBasicBlock destination) { return LLVMBuildBr(builder, destination); }
255
static inline LValue buildBr(LBuilder builder, LBasicBlock destination) { return llvm->BuildBr(builder, destination); }
255
static inline LValue buildCondBr(LBuilder builder, LValue condition, LBasicBlock taken, LBasicBlock notTaken) { return LLVMBuildCondBr(builder, condition, taken, notTaken); }
256
static inline LValue buildCondBr(LBuilder builder, LValue condition, LBasicBlock taken, LBasicBlock notTaken) { return llvm->BuildCondBr(builder, condition, taken, notTaken); }
256
static inline LValue buildSwitch(LBuilder builder, LValue value, LBasicBlock fallThrough, unsigned numCases) { return LLVMBuildSwitch(builder, value, fallThrough, numCases); }
257
static inline LValue buildSwitch(LBuilder builder, LValue value, LBasicBlock fallThrough, unsigned numCases) { return llvm->BuildSwitch(builder, value, fallThrough, numCases); }
257
static inline void addCase(LValue switchInst, LValue value, LBasicBlock target) { LLVMAddCase(switchInst, value, target); }
258
static inline void addCase(LValue switchInst, LValue value, LBasicBlock target) { llvm->AddCase(switchInst, value, target); }
258
template<typename VectorType>
259
template<typename VectorType>
259
static inline LValue buildSwitch(LBuilder builder, LValue value, const VectorType& cases, LBasicBlock fallThrough)
260
static inline LValue buildSwitch(LBuilder builder, LValue value, const VectorType& cases, LBasicBlock fallThrough)
260
{
261
{
Lines 263-277 static inline LValue buildSwitch(LBuilde Source/JavaScriptCore/ftl/FTLAbbreviations.h_sec9
263
        addCase(result, cases[i].value(), cases[i].target());
264
        addCase(result, cases[i].value(), cases[i].target());
264
    return result;
265
    return result;
265
}
266
}
266
static inline LValue buildRet(LBuilder builder, LValue value) { return LLVMBuildRet(builder, value); }
267
static inline LValue buildRet(LBuilder builder, LValue value) { return llvm->BuildRet(builder, value); }
267
static inline LValue buildUnreachable(LBuilder builder) { return LLVMBuildUnreachable(builder); }
268
static inline LValue buildUnreachable(LBuilder builder) { return llvm->BuildUnreachable(builder); }
268
269
269
static inline void dumpModule(LModule module) { LLVMDumpModule(module); }
270
static inline void dumpModule(LModule module) { llvm->DumpModule(module); }
270
static inline void verifyModule(LModule module)
271
static inline void verifyModule(LModule module)
271
{
272
{
272
    char* error = 0;
273
    char* error = 0;
273
    LLVMVerifyModule(module, LLVMAbortProcessAction, &error);
274
    llvm->VerifyModule(module, LLVMAbortProcessAction, &error);
274
    LLVMDisposeMessage(error);
275
    llvm->DisposeMessage(error);
275
}
276
}
276
277
277
} } // namespace JSC::FTL
278
} } // namespace JSC::FTL
- Source/JavaScriptCore/ftl/FTLCompile.cpp -21 / +21 lines
Lines 95-146 void compile(State& state) Source/JavaScriptCore/ftl/FTLCompile.cpp_sec1
95
    char* error = 0;
95
    char* error = 0;
96
    
96
    
97
    LLVMMCJITCompilerOptions options;
97
    LLVMMCJITCompilerOptions options;
98
    LLVMInitializeMCJITCompilerOptions(&options, sizeof(options));
98
    llvm->InitializeMCJITCompilerOptions(&options, sizeof(options));
99
    options.OptLevel = Options::llvmBackendOptimizationLevel();
99
    options.OptLevel = Options::llvmBackendOptimizationLevel();
100
    options.NoFramePointerElim = true;
100
    options.NoFramePointerElim = true;
101
    if (Options::useLLVMSmallCodeModel())
101
    if (Options::useLLVMSmallCodeModel())
102
        options.CodeModel = LLVMCodeModelSmall;
102
        options.CodeModel = LLVMCodeModelSmall;
103
    options.EnableFastISel = Options::enableLLVMFastISel();
103
    options.EnableFastISel = Options::enableLLVMFastISel();
104
    options.MCJMM = LLVMCreateSimpleMCJITMemoryManager(
104
    options.MCJMM = llvm->CreateSimpleMCJITMemoryManager(
105
        &state, mmAllocateCodeSection, mmAllocateDataSection, mmApplyPermissions, mmDestroy);
105
        &state, mmAllocateCodeSection, mmAllocateDataSection, mmApplyPermissions, mmDestroy);
106
    
106
    
107
    LLVMExecutionEngineRef engine;
107
    LLVMExecutionEngineRef engine;
108
    
108
    
109
    if (LLVMCreateMCJITCompilerForModule(&engine, state.module, &options, sizeof(options), &error)) {
109
    if (llvm->CreateMCJITCompilerForModule(&engine, state.module, &options, sizeof(options), &error)) {
110
        dataLog("FATAL: Could not create LLVM execution engine: ", error, "\n");
110
        dataLog("FATAL: Could not create LLVM execution engine: ", error, "\n");
111
        CRASH();
111
        CRASH();
112
    }
112
    }
113
113
114
    LLVMPassManagerBuilderRef passBuilder = LLVMPassManagerBuilderCreate();
114
    LLVMPassManagerBuilderRef passBuilder = llvm->PassManagerBuilderCreate();
115
    LLVMPassManagerBuilderSetOptLevel(passBuilder, Options::llvmOptimizationLevel());
115
    llvm->PassManagerBuilderSetOptLevel(passBuilder, Options::llvmOptimizationLevel());
116
    LLVMPassManagerBuilderSetSizeLevel(passBuilder, Options::llvmSizeLevel());
116
    llvm->PassManagerBuilderSetSizeLevel(passBuilder, Options::llvmSizeLevel());
117
    
117
    
118
    LLVMPassManagerRef functionPasses = LLVMCreateFunctionPassManagerForModule(state.module);
118
    LLVMPassManagerRef functionPasses = llvm->CreateFunctionPassManagerForModule(state.module);
119
    LLVMPassManagerRef modulePasses = LLVMCreatePassManager();
119
    LLVMPassManagerRef modulePasses = llvm->CreatePassManager();
120
    
120
    
121
    LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), modulePasses);
121
    llvm->AddTargetData(llvm->GetExecutionEngineTargetData(engine), modulePasses);
122
    
122
    
123
    LLVMPassManagerBuilderPopulateFunctionPassManager(passBuilder, functionPasses);
123
    llvm->PassManagerBuilderPopulateFunctionPassManager(passBuilder, functionPasses);
124
    LLVMPassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses);
124
    llvm->PassManagerBuilderPopulateModulePassManager(passBuilder, modulePasses);
125
    
125
    
126
    LLVMPassManagerBuilderDispose(passBuilder);
126
    llvm->PassManagerBuilderDispose(passBuilder);
127
127
128
    LLVMInitializeFunctionPassManager(functionPasses);
128
    llvm->InitializeFunctionPassManager(functionPasses);
129
    for (LValue function = LLVMGetFirstFunction(state.module); function; function = LLVMGetNextFunction(function))
129
    for (LValue function = llvm->GetFirstFunction(state.module); function; function = llvm->GetNextFunction(function))
130
        LLVMRunFunctionPassManager(functionPasses, function);
130
        llvm->RunFunctionPassManager(functionPasses, function);
131
    LLVMFinalizeFunctionPassManager(functionPasses);
131
    llvm->FinalizeFunctionPassManager(functionPasses);
132
    
132
    
133
    LLVMRunPassManager(modulePasses, state.module);
133
    llvm->RunPassManager(modulePasses, state.module);
134
134
135
    if (DFG::shouldShowDisassembly() || DFG::verboseCompilationEnabled())
135
    if (DFG::shouldShowDisassembly() || DFG::verboseCompilationEnabled())
136
        state.dumpState("after optimization");
136
        state.dumpState("after optimization");
137
    
137
    
138
    // FIXME: Need to add support for the case where JIT memory allocation failed.
138
    // FIXME: Need to add support for the case where JIT memory allocation failed.
139
    // https://bugs.webkit.org/show_bug.cgi?id=113620
139
    // https://bugs.webkit.org/show_bug.cgi?id=113620
140
    state.generatedFunction = reinterpret_cast<GeneratedFunction>(LLVMGetPointerToGlobal(engine, state.function));
140
    state.generatedFunction = reinterpret_cast<GeneratedFunction>(llvm->GetPointerToGlobal(engine, state.function));
141
    LLVMDisposePassManager(functionPasses);
141
    llvm->DisposePassManager(functionPasses);
142
    LLVMDisposePassManager(modulePasses);
142
    llvm->DisposePassManager(modulePasses);
143
    LLVMDisposeExecutionEngine(engine);
143
    llvm->DisposeExecutionEngine(engine);
144
144
145
    if (shouldShowDisassembly()) {
145
    if (shouldShowDisassembly()) {
146
        // FIXME: fourthTier: FTL memory allocator should be able to tell us which of
146
        // FIXME: fourthTier: FTL memory allocator should be able to tell us which of
- Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp -1 / +1 lines
Lines 91-97 public: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec1
91
        m_graph.m_dominators.computeIfNecessary(m_graph);
91
        m_graph.m_dominators.computeIfNecessary(m_graph);
92
        
92
        
93
        m_ftlState.module =
93
        m_ftlState.module =
94
            LLVMModuleCreateWithNameInContext(name.data(), m_ftlState.context);
94
            llvm->ModuleCreateWithNameInContext(name.data(), m_ftlState.context);
95
        
95
        
96
        m_ftlState.function = addFunction(
96
        m_ftlState.function = addFunction(
97
            m_ftlState.module, name.data(), functionType(m_out.int64, m_out.intPtr));
97
            m_ftlState.module, name.data(), functionType(m_out.int64, m_out.intPtr));
- Source/JavaScriptCore/llvm/InitializeLLVM.cpp +45 lines
Line 0 Source/JavaScriptCore/llvm/InitializeLLVM.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "InitializeLLVM.h"
28
29
#if HAVE(LLVM)
30
31
#include <wtf/Threading.h>
32
33
namespace JSC {
34
35
static pthread_once_t initializeLLVMOnceKey = PTHREAD_ONCE_INIT;
36
37
void initializeLLVM()
38
{
39
    pthread_once(&initializeLLVMOnceKey, initializeLLVMImpl);
40
}
41
42
} // namespace JSC
43
44
#endif // HAVE(LLVM)
45
- Source/JavaScriptCore/llvm/InitializeLLVM.h +44 lines
Line 0 Source/JavaScriptCore/llvm/InitializeLLVM.h_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef InitializeLLVM_h
27
#define InitializeLLVM_h
28
29
#include <wtf/Platform.h>
30
31
#if HAVE(LLVM)
32
33
namespace JSC {
34
35
void initializeLLVMImpl();
36
37
void initializeLLVM(); // It's safe to call this multiple times.
38
39
} // namespace JSC
40
41
#endif // HAVE(LLVM)
42
43
#endif // InitializeLLVM_h
44
- Source/JavaScriptCore/llvm/InitializeLLVMMac.mm +54 lines
Line 0 Source/JavaScriptCore/llvm/InitializeLLVMMac.mm_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#import "config.h"
27
#import "InitializeLLVM.h"
28
29
#if HAVE(LLVM)
30
31
#import <Foundation/Foundation.h>
32
#import <wtf/DataLog.h>
33
#import <wtf/text/WTFString.h>
34
35
@interface JSCLLVMDummy : NSObject
36
@end
37
38
@implementation JSCLLVMDummy {
39
}
40
@end
41
42
namespace JSC {
43
44
void initializeLLVMImpl()
45
{
46
    NSBundle* myBundle = [NSBundle bundleForClass:[JSCLLVMDummy class]];
47
    NSString* resourcePath = [myBundle resourcePath];
48
49
    initializeLLVMPOSIX([resourcePath UTF8String]);
50
}
51
52
} // namespace JSC
53
54
#endif // HAVE(LLVM)
- Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp +53 lines
Line 0 Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "InitializeLLVMPOSIX.h"
28
29
#if HAVE(LLVM)
30
31
#include "LLVMAPI.h"
32
#include <dlfcn.h>
33
34
namespace JSC {
35
36
typedef LLVMAPI* (*InitializerFunction)();
37
38
void initializeLLVMPOSIX(const char* libraryName)
39
{
40
    void* library = dlopen(libraryName);
41
    ASSERT_WITH_MESSAGE(library, "%s", dlerror());
42
    
43
    InitializerFunction initializer = static_cast<InitializerFunction*>(
44
        dlsym(library, "initializeAndGetJSCLLVMAPI"));
45
    ASSERT_WITH_MESSAGE(initializer, "%s", dlerror());
46
    
47
    llvm = initializer();
48
}
49
50
} // namespace JSC
51
52
#endif // HAVE(LLVM)
53
- Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.h +42 lines
Line 0 Source/JavaScriptCore/llvm/InitializeLLVMPOSIX.h_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef InitializeLLVM_h
27
#define InitializeLLVM_h
28
29
#include <wtf/Platform.h>
30
31
#if HAVE(LLVM)
32
33
namespace JSC {
34
35
void initializeLLVMPOSIX(const char* libraryName);
36
37
} // namespace JSC
38
39
#endif // HAVE(LLVM)
40
41
#endif // InitializeLLVM_h
42
- Source/JavaScriptCore/llvm/LLVMAPI.cpp +34 lines
Line 0 Source/JavaScriptCore/llvm/LLVMAPI.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "LLVMAPI.h"
28
29
namespace JSC {
30
31
LLVMAPI* llvm;
32
33
}
34
- Source/JavaScriptCore/llvm/LLVMAPI.h +46 lines
Line 0 Source/JavaScriptCore/llvm/LLVMAPI.h_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef LLVMAPI_h
27
#define LLVMAPI_H
28
29
#include "LLVMAPIFunctions.h"
30
#include "LLVMHeaders.h"
31
32
namespace JSC {
33
34
struct LLVMAPI {
35
#define LLVM_API_FUNCTION_DECLARATION(returnType, name, signature) \
36
    returnType (*name) signature;
37
    FOR_EACH_LLVM_API_FUNCTION(LLVM_API_FUNCTION_DECLARATION)
38
#undef LLVM_API_FUNCTION_DECLARATION
39
};
40
41
extern LLVMAPI* llvm;
42
43
} // namespace JSC
44
45
#endif // LLVMAPI_h
46
- Source/JavaScriptCore/llvm/LLVMAPIFunctions.h +634 lines
Line 0 Source/JavaScriptCore/llvm/LLVMAPIFunctions.h_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef LLVMAPIFunctions_h
27
#define LLVMAPIFunctions_h
28
29
#define FOR_EACH_LLVM_API_FUNCTION(macro) \
30
    macro(void , InitializeCore, (LLVMPassRegistryRef R)) \
31
    macro(void , Shutdown, ()) \
32
    macro(char *, CreateMessage, (const char *Message)) \
33
    macro(void , DisposeMessage, (char *Message)) \
34
    macro(LLVMContextRef , ContextCreate, (void)) \
35
    macro(LLVMContextRef , GetGlobalContext, (void)) \
36
    macro(void , ContextDispose, (LLVMContextRef C)) \
37
    macro(unsigned , GetMDKindIDInContext, (LLVMContextRef C, const char* Name, unsigned SLen)) \
38
    macro(unsigned , GetMDKindID, (const char* Name, unsigned SLen)) \
39
    macro(LLVMModuleRef , ModuleCreateWithName, (const char *ModuleID)) \
40
    macro(LLVMModuleRef , ModuleCreateWithNameInContext, (const char *ModuleID, LLVMContextRef C)) \
41
    macro(void , DisposeModule, (LLVMModuleRef M)) \
42
    macro(const char *, GetDataLayout, (LLVMModuleRef M)) \
43
    macro(void , SetDataLayout, (LLVMModuleRef M, const char *Triple)) \
44
    macro(const char *, GetTarget, (LLVMModuleRef M)) \
45
    macro(void , SetTarget, (LLVMModuleRef M, const char *Triple)) \
46
    macro(void , DumpModule, (LLVMModuleRef M)) \
47
    macro(LLVMBool , PrintModuleToFile, (LLVMModuleRef M, const char *Filename, char **ErrorMessage)) \
48
    macro(void , SetModuleInlineAsm, (LLVMModuleRef M, const char *Asm)) \
49
    macro(LLVMContextRef , GetModuleContext, (LLVMModuleRef M)) \
50
    macro(LLVMTypeRef , GetTypeByName, (LLVMModuleRef M, const char *Name)) \
51
    macro(unsigned , GetNamedMetadataNumOperands, (LLVMModuleRef M, const char* name)) \
52
    macro(void , GetNamedMetadataOperands, (LLVMModuleRef M, const char* name, LLVMValueRef *Dest)) \
53
    macro(void , AddNamedMetadataOperand, (LLVMModuleRef M, const char* name, LLVMValueRef Val)) \
54
    macro(LLVMValueRef , AddFunction, (LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)) \
55
    macro(LLVMValueRef , GetNamedFunction, (LLVMModuleRef M, const char *Name)) \
56
    macro(LLVMValueRef , GetFirstFunction, (LLVMModuleRef M)) \
57
    macro(LLVMValueRef , GetLastFunction, (LLVMModuleRef M)) \
58
    macro(LLVMValueRef , GetNextFunction, (LLVMValueRef Fn)) \
59
    macro(LLVMValueRef , GetPreviousFunction, (LLVMValueRef Fn)) \
60
    macro(LLVMTypeKind , GetTypeKind, (LLVMTypeRef Ty)) \
61
    macro(LLVMBool , TypeIsSized, (LLVMTypeRef Ty)) \
62
    macro(LLVMContextRef , GetTypeContext, (LLVMTypeRef Ty)) \
63
    macro(LLVMTypeRef , Int1TypeInContext, (LLVMContextRef C)) \
64
    macro(LLVMTypeRef , Int8TypeInContext, (LLVMContextRef C)) \
65
    macro(LLVMTypeRef , Int16TypeInContext, (LLVMContextRef C)) \
66
    macro(LLVMTypeRef , Int32TypeInContext, (LLVMContextRef C)) \
67
    macro(LLVMTypeRef , Int64TypeInContext, (LLVMContextRef C)) \
68
    macro(LLVMTypeRef , IntTypeInContext, (LLVMContextRef C, unsigned NumBits)) \
69
    macro(LLVMTypeRef , Int1Type, (void)) \
70
    macro(LLVMTypeRef , Int8Type, (void)) \
71
    macro(LLVMTypeRef , Int16Type, (void)) \
72
    macro(LLVMTypeRef , Int32Type, (void)) \
73
    macro(LLVMTypeRef , Int64Type, (void)) \
74
    macro(LLVMTypeRef , IntType, (unsigned NumBits)) \
75
    macro(unsigned , GetIntTypeWidth, (LLVMTypeRef IntegerTy)) \
76
    macro(LLVMTypeRef , HalfTypeInContext, (LLVMContextRef C)) \
77
    macro(LLVMTypeRef , FloatTypeInContext, (LLVMContextRef C)) \
78
    macro(LLVMTypeRef , DoubleTypeInContext, (LLVMContextRef C)) \
79
    macro(LLVMTypeRef , X86FP80TypeInContext, (LLVMContextRef C)) \
80
    macro(LLVMTypeRef , FP128TypeInContext, (LLVMContextRef C)) \
81
    macro(LLVMTypeRef , PPCFP128TypeInContext, (LLVMContextRef C)) \
82
    macro(LLVMTypeRef , HalfType, (void)) \
83
    macro(LLVMTypeRef , FloatType, (void)) \
84
    macro(LLVMTypeRef , DoubleType, (void)) \
85
    macro(LLVMTypeRef , X86FP80Type, (void)) \
86
    macro(LLVMTypeRef , FP128Type, (void)) \
87
    macro(LLVMTypeRef , PPCFP128Type, (void)) \
88
    macro(LLVMTypeRef , FunctionType, (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)) \
89
    macro(LLVMBool , IsFunctionVarArg, (LLVMTypeRef FunctionTy)) \
90
    macro(LLVMTypeRef , GetReturnType, (LLVMTypeRef FunctionTy)) \
91
    macro(unsigned , CountParamTypes, (LLVMTypeRef FunctionTy)) \
92
    macro(void , GetParamTypes, (LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)) \
93
    macro(LLVMTypeRef , StructTypeInContext, (LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \
94
    macro(LLVMTypeRef , StructType, (LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \
95
    macro(LLVMTypeRef , StructCreateNamed, (LLVMContextRef C, const char *Name)) \
96
    macro(const char *, GetStructName, (LLVMTypeRef Ty)) \
97
    macro(void , StructSetBody, (LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)) \
98
    macro(unsigned , CountStructElementTypes, (LLVMTypeRef StructTy)) \
99
    macro(void , GetStructElementTypes, (LLVMTypeRef StructTy, LLVMTypeRef *Dest)) \
100
    macro(LLVMBool , IsPackedStruct, (LLVMTypeRef StructTy)) \
101
    macro(LLVMBool , IsOpaqueStruct, (LLVMTypeRef StructTy)) \
102
    macro(LLVMTypeRef , GetElementType, (LLVMTypeRef Ty)) \
103
    macro(LLVMTypeRef , ArrayType, (LLVMTypeRef ElementType, unsigned ElementCount)) \
104
    macro(unsigned , GetArrayLength, (LLVMTypeRef ArrayTy)) \
105
    macro(LLVMTypeRef , PointerType, (LLVMTypeRef ElementType, unsigned AddressSpace)) \
106
    macro(unsigned , GetPointerAddressSpace, (LLVMTypeRef PointerTy)) \
107
    macro(LLVMTypeRef , VectorType, (LLVMTypeRef ElementType, unsigned ElementCount)) \
108
    macro(unsigned , GetVectorSize, (LLVMTypeRef VectorTy)) \
109
    macro(LLVMTypeRef , VoidTypeInContext, (LLVMContextRef C)) \
110
    macro(LLVMTypeRef , LabelTypeInContext, (LLVMContextRef C)) \
111
    macro(LLVMTypeRef , X86MMXTypeInContext, (LLVMContextRef C)) \
112
    macro(LLVMTypeRef , VoidType, (void)) \
113
    macro(LLVMTypeRef , LabelType, (void)) \
114
    macro(LLVMTypeRef , X86MMXType, (void)) \
115
    macro(LLVMTypeRef , TypeOf, (LLVMValueRef Val)) \
116
    macro(const char *, GetValueName, (LLVMValueRef Val)) \
117
    macro(void , SetValueName, (LLVMValueRef Val, const char *Name)) \
118
    macro(void , DumpValue, (LLVMValueRef Val)) \
119
    macro(void , ReplaceAllUsesWith, (LLVMValueRef OldVal, LLVMValueRef NewVal)) \
120
    macro(LLVMBool , IsConstant, (LLVMValueRef Val)) \
121
    macro(LLVMBool , IsUndef, (LLVMValueRef Val)) \
122
    macro(LLVMValueRef , IsAArgument, (LLVMValueRef Val)) \
123
    macro( LLVMValueRef , IsABasicBlock, (LLVMValueRef Val)) \
124
    macro( LLVMValueRef , IsAInlineAsm, (LLVMValueRef Val)) \
125
    macro( LLVMValueRef , IsAMDNode, (LLVMValueRef Val)) \
126
    macro( LLVMValueRef , IsAMDString, (LLVMValueRef Val)) \
127
    macro( LLVMValueRef , IsAUser, (LLVMValueRef Val)) \
128
    macro( LLVMValueRef , IsAConstant, (LLVMValueRef Val)) \
129
    macro( LLVMValueRef , IsABlockAddress, (LLVMValueRef Val)) \
130
    macro( LLVMValueRef , IsAConstantAggregateZero, (LLVMValueRef Val)) \
131
    macro( LLVMValueRef , IsAConstantArray, (LLVMValueRef Val)) \
132
    macro( LLVMValueRef , IsAConstantExpr, (LLVMValueRef Val)) \
133
    macro( LLVMValueRef , IsAConstantFP, (LLVMValueRef Val)) \
134
    macro( LLVMValueRef , IsAConstantInt, (LLVMValueRef Val)) \
135
    macro( LLVMValueRef , IsAConstantPointerNull, (LLVMValueRef Val)) \
136
    macro( LLVMValueRef , IsAConstantStruct, (LLVMValueRef Val)) \
137
    macro( LLVMValueRef , IsAConstantVector, (LLVMValueRef Val)) \
138
    macro( LLVMValueRef , IsAGlobalValue, (LLVMValueRef Val)) \
139
    macro( LLVMValueRef , IsAFunction, (LLVMValueRef Val)) \
140
    macro( LLVMValueRef , IsAGlobalAlias, (LLVMValueRef Val)) \
141
    macro( LLVMValueRef , IsAGlobalVariable, (LLVMValueRef Val)) \
142
    macro( LLVMValueRef , IsAUndefValue, (LLVMValueRef Val)) \
143
    macro( LLVMValueRef , IsAInstruction, (LLVMValueRef Val)) \
144
    macro( LLVMValueRef , IsABinaryOperator, (LLVMValueRef Val)) \
145
    macro( LLVMValueRef , IsACallInst, (LLVMValueRef Val)) \
146
    macro( LLVMValueRef , IsAIntrinsicInst, (LLVMValueRef Val)) \
147
    macro( LLVMValueRef , IsADbgInfoIntrinsic, (LLVMValueRef Val)) \
148
    macro( LLVMValueRef , IsADbgDeclareInst, (LLVMValueRef Val)) \
149
    macro( LLVMValueRef , IsAMemIntrinsic, (LLVMValueRef Val)) \
150
    macro( LLVMValueRef , IsAMemCpyInst, (LLVMValueRef Val)) \
151
    macro( LLVMValueRef , IsAMemMoveInst, (LLVMValueRef Val)) \
152
    macro( LLVMValueRef , IsAMemSetInst, (LLVMValueRef Val)) \
153
    macro( LLVMValueRef , IsACmpInst, (LLVMValueRef Val)) \
154
    macro( LLVMValueRef , IsAFCmpInst, (LLVMValueRef Val)) \
155
    macro( LLVMValueRef , IsAICmpInst, (LLVMValueRef Val)) \
156
    macro( LLVMValueRef , IsAExtractElementInst, (LLVMValueRef Val)) \
157
    macro( LLVMValueRef , IsAGetElementPtrInst, (LLVMValueRef Val)) \
158
    macro( LLVMValueRef , IsAInsertElementInst, (LLVMValueRef Val)) \
159
    macro( LLVMValueRef , IsAInsertValueInst, (LLVMValueRef Val)) \
160
    macro( LLVMValueRef , IsALandingPadInst, (LLVMValueRef Val)) \
161
    macro( LLVMValueRef , IsAPHINode, (LLVMValueRef Val)) \
162
    macro( LLVMValueRef , IsASelectInst, (LLVMValueRef Val)) \
163
    macro( LLVMValueRef , IsAShuffleVectorInst, (LLVMValueRef Val)) \
164
    macro( LLVMValueRef , IsAStoreInst, (LLVMValueRef Val)) \
165
    macro( LLVMValueRef , IsATerminatorInst, (LLVMValueRef Val)) \
166
    macro( LLVMValueRef , IsABranchInst, (LLVMValueRef Val)) \
167
    macro( LLVMValueRef , IsAIndirectBrInst, (LLVMValueRef Val)) \
168
    macro( LLVMValueRef , IsAInvokeInst, (LLVMValueRef Val)) \
169
    macro( LLVMValueRef , IsAReturnInst, (LLVMValueRef Val)) \
170
    macro( LLVMValueRef , IsASwitchInst, (LLVMValueRef Val)) \
171
    macro( LLVMValueRef , IsAUnreachableInst, (LLVMValueRef Val)) \
172
    macro( LLVMValueRef , IsAResumeInst, (LLVMValueRef Val)) \
173
    macro( LLVMValueRef , IsAUnaryInstruction, (LLVMValueRef Val)) \
174
    macro( LLVMValueRef , IsAAllocaInst, (LLVMValueRef Val)) \
175
    macro( LLVMValueRef , IsACastInst, (LLVMValueRef Val)) \
176
    macro( LLVMValueRef , IsABitCastInst, (LLVMValueRef Val)) \
177
    macro( LLVMValueRef , IsAFPExtInst, (LLVMValueRef Val)) \
178
    macro( LLVMValueRef , IsAFPToSIInst, (LLVMValueRef Val)) \
179
    macro( LLVMValueRef , IsAFPToUIInst, (LLVMValueRef Val)) \
180
    macro( LLVMValueRef , IsAFPTruncInst, (LLVMValueRef Val)) \
181
    macro( LLVMValueRef , IsAIntToPtrInst, (LLVMValueRef Val)) \
182
    macro( LLVMValueRef , IsAPtrToIntInst, (LLVMValueRef Val)) \
183
    macro( LLVMValueRef , IsASExtInst, (LLVMValueRef Val)) \
184
    macro( LLVMValueRef , IsASIToFPInst, (LLVMValueRef Val)) \
185
    macro( LLVMValueRef , IsATruncInst, (LLVMValueRef Val)) \
186
    macro( LLVMValueRef , IsAUIToFPInst, (LLVMValueRef Val)) \
187
    macro( LLVMValueRef , IsAZExtInst, (LLVMValueRef Val)) \
188
    macro( LLVMValueRef , IsAExtractValueInst, (LLVMValueRef Val)) \
189
    macro( LLVMValueRef , IsALoadInst, (LLVMValueRef Val)) \
190
    macro( LLVMValueRef , IsAVAArgInst, (LLVMValueRef Val)) \
191
    macro(LLVMUseRef , GetFirstUse, (LLVMValueRef Val)) \
192
    macro(LLVMUseRef , GetNextUse, (LLVMUseRef U)) \
193
    macro(LLVMValueRef , GetUser, (LLVMUseRef U)) \
194
    macro(LLVMValueRef , GetUsedValue, (LLVMUseRef U)) \
195
    macro(LLVMValueRef , GetOperand, (LLVMValueRef Val, unsigned Index)) \
196
    macro(void , SetOperand, (LLVMValueRef User, unsigned Index, LLVMValueRef Val)) \
197
    macro(int , GetNumOperands, (LLVMValueRef Val)) \
198
    macro(LLVMValueRef , ConstNull, (LLVMTypeRef Ty)) \
199
    macro(LLVMValueRef , ConstAllOnes, (LLVMTypeRef Ty)) \
200
    macro(LLVMValueRef , GetUndef, (LLVMTypeRef Ty)) \
201
    macro(LLVMBool , IsNull, (LLVMValueRef Val)) \
202
    macro(LLVMValueRef , ConstPointerNull, (LLVMTypeRef Ty)) \
203
    macro(LLVMValueRef , ConstInt, (LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)) \
204
    macro(LLVMValueRef , ConstIntOfArbitraryPrecision, (LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])) \
205
    macro(LLVMValueRef , ConstIntOfString, (LLVMTypeRef IntTy, const char *Text, uint8_t Radix)) \
206
    macro(LLVMValueRef , ConstIntOfStringAndSize, (LLVMTypeRef IntTy, const char *Text, unsigned SLen, uint8_t Radix)) \
207
    macro(LLVMValueRef , ConstReal, (LLVMTypeRef RealTy, double N)) \
208
    macro(LLVMValueRef , ConstRealOfString, (LLVMTypeRef RealTy, const char *Text)) \
209
    macro(LLVMValueRef , ConstRealOfStringAndSize, (LLVMTypeRef RealTy, const char *Text, unsigned SLen)) \
210
    macro(unsigned long long , ConstIntGetZExtValue, (LLVMValueRef ConstantVal)) \
211
    macro(long long , ConstIntGetSExtValue, (LLVMValueRef ConstantVal)) \
212
    macro(LLVMValueRef , ConstStringInContext, (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)) \
213
    macro(LLVMValueRef , ConstString, (const char *Str, unsigned Length, LLVMBool DontNullTerminate)) \
214
    macro(LLVMValueRef , ConstStructInContext, (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)) \
215
    macro(LLVMValueRef , ConstStruct, (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)) \
216
    macro(LLVMValueRef , ConstArray, (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)) \
217
    macro(LLVMValueRef , ConstNamedStruct, (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)) \
218
    macro(LLVMValueRef , ConstVector, (LLVMValueRef *ScalarConstantVals, unsigned Size)) \
219
    macro(LLVMOpcode , GetConstOpcode, (LLVMValueRef ConstantVal)) \
220
    macro(LLVMValueRef , AlignOf, (LLVMTypeRef Ty)) \
221
    macro(LLVMValueRef , SizeOf, (LLVMTypeRef Ty)) \
222
    macro(LLVMValueRef , ConstNeg, (LLVMValueRef ConstantVal)) \
223
    macro(LLVMValueRef , ConstNSWNeg, (LLVMValueRef ConstantVal)) \
224
    macro(LLVMValueRef , ConstNUWNeg, (LLVMValueRef ConstantVal)) \
225
    macro(LLVMValueRef , ConstFNeg, (LLVMValueRef ConstantVal)) \
226
    macro(LLVMValueRef , ConstNot, (LLVMValueRef ConstantVal)) \
227
    macro(LLVMValueRef , ConstAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
228
    macro(LLVMValueRef , ConstNSWAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
229
    macro(LLVMValueRef , ConstNUWAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
230
    macro(LLVMValueRef , ConstFAdd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
231
    macro(LLVMValueRef , ConstSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
232
    macro(LLVMValueRef , ConstNSWSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
233
    macro(LLVMValueRef , ConstNUWSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
234
    macro(LLVMValueRef , ConstFSub, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
235
    macro(LLVMValueRef , ConstMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
236
    macro(LLVMValueRef , ConstNSWMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
237
    macro(LLVMValueRef , ConstNUWMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
238
    macro(LLVMValueRef , ConstFMul, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
239
    macro(LLVMValueRef , ConstUDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
240
    macro(LLVMValueRef , ConstSDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
241
    macro(LLVMValueRef , ConstExactSDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
242
    macro(LLVMValueRef , ConstFDiv, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
243
    macro(LLVMValueRef , ConstURem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
244
    macro(LLVMValueRef , ConstSRem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
245
    macro(LLVMValueRef , ConstFRem, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
246
    macro(LLVMValueRef , ConstAnd, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
247
    macro(LLVMValueRef , ConstOr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
248
    macro(LLVMValueRef , ConstXor, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
249
    macro(LLVMValueRef , ConstICmp, (LLVMIntPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
250
    macro(LLVMValueRef , ConstFCmp, (LLVMRealPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
251
    macro(LLVMValueRef , ConstShl, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
252
    macro(LLVMValueRef , ConstLShr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
253
    macro(LLVMValueRef , ConstAShr, (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)) \
254
    macro(LLVMValueRef , ConstGEP, (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)) \
255
    macro(LLVMValueRef , ConstInBoundsGEP, (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)) \
256
    macro(LLVMValueRef , ConstTrunc, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
257
    macro(LLVMValueRef , ConstSExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
258
    macro(LLVMValueRef , ConstZExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
259
    macro(LLVMValueRef , ConstFPTrunc, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
260
    macro(LLVMValueRef , ConstFPExt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
261
    macro(LLVMValueRef , ConstUIToFP, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
262
    macro(LLVMValueRef , ConstSIToFP, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
263
    macro(LLVMValueRef , ConstFPToUI, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
264
    macro(LLVMValueRef , ConstFPToSI, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
265
    macro(LLVMValueRef , ConstPtrToInt, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
266
    macro(LLVMValueRef , ConstIntToPtr, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
267
    macro(LLVMValueRef , ConstBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
268
    macro(LLVMValueRef , ConstZExtOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
269
    macro(LLVMValueRef , ConstSExtOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
270
    macro(LLVMValueRef , ConstTruncOrBitCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
271
    macro(LLVMValueRef , ConstPointerCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
272
    macro(LLVMValueRef , ConstIntCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType, LLVMBool isSigned)) \
273
    macro(LLVMValueRef , ConstFPCast, (LLVMValueRef ConstantVal, LLVMTypeRef ToType)) \
274
    macro(LLVMValueRef , ConstSelect, (LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, LLVMValueRef ConstantIfFalse)) \
275
    macro(LLVMValueRef , ConstExtractElement, (LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)) \
276
    macro(LLVMValueRef , ConstInsertElement, (LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)) \
277
    macro(LLVMValueRef , ConstShuffleVector, (LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)) \
278
    macro(LLVMValueRef , ConstExtractValue, (LLVMValueRef AggConstant, unsigned *IdxList, unsigned NumIdx)) \
279
    macro(LLVMValueRef , ConstInsertValue, (LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, unsigned *IdxList, unsigned NumIdx)) \
280
    macro(LLVMValueRef , ConstInlineAsm, (LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)) \
281
    macro(LLVMValueRef , BlockAddress, (LLVMValueRef F, LLVMBasicBlockRef BB)) \
282
    macro(LLVMModuleRef , GetGlobalParent, (LLVMValueRef Global)) \
283
    macro(LLVMBool , IsDeclaration, (LLVMValueRef Global)) \
284
    macro(LLVMLinkage , GetLinkage, (LLVMValueRef Global)) \
285
    macro(void , SetLinkage, (LLVMValueRef Global, LLVMLinkage Linkage)) \
286
    macro(const char *, GetSection, (LLVMValueRef Global)) \
287
    macro(void , SetSection, (LLVMValueRef Global, const char *Section)) \
288
    macro(LLVMVisibility , GetVisibility, (LLVMValueRef Global)) \
289
    macro(void , SetVisibility, (LLVMValueRef Global, LLVMVisibility Viz)) \
290
    macro(unsigned , GetAlignment, (LLVMValueRef Global)) \
291
    macro(void , SetAlignment, (LLVMValueRef Global, unsigned Bytes)) \
292
    macro(LLVMValueRef , AddGlobal, (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)) \
293
    macro(LLVMValueRef , AddGlobalInAddressSpace, (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)) \
294
    macro(LLVMValueRef , GetNamedGlobal, (LLVMModuleRef M, const char *Name)) \
295
    macro(LLVMValueRef , GetFirstGlobal, (LLVMModuleRef M)) \
296
    macro(LLVMValueRef , GetLastGlobal, (LLVMModuleRef M)) \
297
    macro(LLVMValueRef , GetNextGlobal, (LLVMValueRef GlobalVar)) \
298
    macro(LLVMValueRef , GetPreviousGlobal, (LLVMValueRef GlobalVar)) \
299
    macro(void , DeleteGlobal, (LLVMValueRef GlobalVar)) \
300
    macro(LLVMValueRef , GetInitializer, (LLVMValueRef GlobalVar)) \
301
    macro(void , SetInitializer, (LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)) \
302
    macro(LLVMBool , IsThreadLocal, (LLVMValueRef GlobalVar)) \
303
    macro(void , SetThreadLocal, (LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)) \
304
    macro(LLVMBool , IsGlobalConstant, (LLVMValueRef GlobalVar)) \
305
    macro(void , SetGlobalConstant, (LLVMValueRef GlobalVar, LLVMBool IsConstant)) \
306
    macro(LLVMThreadLocalMode , GetThreadLocalMode, (LLVMValueRef GlobalVar)) \
307
    macro(void , SetThreadLocalMode, (LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)) \
308
    macro(LLVMBool , IsExternallyInitialized, (LLVMValueRef GlobalVar)) \
309
    macro(void , SetExternallyInitialized, (LLVMValueRef GlobalVar, LLVMBool IsExtInit)) \
310
    macro(LLVMValueRef , AddAlias, (LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, const char *Name)) \
311
    macro(void , DeleteFunction, (LLVMValueRef Fn)) \
312
    macro(unsigned , GetIntrinsicID, (LLVMValueRef Fn)) \
313
    macro(unsigned , GetFunctionCallConv, (LLVMValueRef Fn)) \
314
    macro(void , SetFunctionCallConv, (LLVMValueRef Fn, unsigned CC)) \
315
    macro(const char *, GetGC, (LLVMValueRef Fn)) \
316
    macro(void , SetGC, (LLVMValueRef Fn, const char *Name)) \
317
    macro(void , AddFunctionAttr, (LLVMValueRef Fn, LLVMAttribute PA)) \
318
    macro(void , AddTargetDependentFunctionAttr, (LLVMValueRef Fn, const char *A, const char *V)) \
319
    macro(LLVMAttribute , GetFunctionAttr, (LLVMValueRef Fn)) \
320
    macro(void , RemoveFunctionAttr, (LLVMValueRef Fn, LLVMAttribute PA)) \
321
    macro(unsigned , CountParams, (LLVMValueRef Fn)) \
322
    macro(void , GetParams, (LLVMValueRef Fn, LLVMValueRef *Params)) \
323
    macro(LLVMValueRef , GetParam, (LLVMValueRef Fn, unsigned Index)) \
324
    macro(LLVMValueRef , GetParamParent, (LLVMValueRef Inst)) \
325
    macro(LLVMValueRef , GetFirstParam, (LLVMValueRef Fn)) \
326
    macro(LLVMValueRef , GetLastParam, (LLVMValueRef Fn)) \
327
    macro(LLVMValueRef , GetNextParam, (LLVMValueRef Arg)) \
328
    macro(LLVMValueRef , GetPreviousParam, (LLVMValueRef Arg)) \
329
    macro(void , AddAttribute, (LLVMValueRef Arg, LLVMAttribute PA)) \
330
    macro(void , RemoveAttribute, (LLVMValueRef Arg, LLVMAttribute PA)) \
331
    macro(LLVMAttribute , GetAttribute, (LLVMValueRef Arg)) \
332
    macro(void , SetParamAlignment, (LLVMValueRef Arg, unsigned align)) \
333
    macro(LLVMValueRef , MDStringInContext, (LLVMContextRef C, const char *Str, unsigned SLen)) \
334
    macro(LLVMValueRef , MDString, (const char *Str, unsigned SLen)) \
335
    macro(LLVMValueRef , MDNodeInContext, (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)) \
336
    macro(LLVMValueRef , MDNode, (LLVMValueRef *Vals, unsigned Count)) \
337
    macro(const char *, GetMDString, (LLVMValueRef V, unsigned* Len)) \
338
    macro(unsigned , GetMDNodeNumOperands, (LLVMValueRef V)) \
339
    macro(void , GetMDNodeOperands, (LLVMValueRef V, LLVMValueRef *Dest)) \
340
    macro(LLVMValueRef , BasicBlockAsValue, (LLVMBasicBlockRef BB)) \
341
    macro(LLVMBool , ValueIsBasicBlock, (LLVMValueRef Val)) \
342
    macro(LLVMBasicBlockRef , ValueAsBasicBlock, (LLVMValueRef Val)) \
343
    macro(LLVMValueRef , GetBasicBlockParent, (LLVMBasicBlockRef BB)) \
344
    macro(LLVMValueRef , GetBasicBlockTerminator, (LLVMBasicBlockRef BB)) \
345
    macro(unsigned , CountBasicBlocks, (LLVMValueRef Fn)) \
346
    macro(void , GetBasicBlocks, (LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks)) \
347
    macro(LLVMBasicBlockRef , GetFirstBasicBlock, (LLVMValueRef Fn)) \
348
    macro(LLVMBasicBlockRef , GetLastBasicBlock, (LLVMValueRef Fn)) \
349
    macro(LLVMBasicBlockRef , GetNextBasicBlock, (LLVMBasicBlockRef BB)) \
350
    macro(LLVMBasicBlockRef , GetPreviousBasicBlock, (LLVMBasicBlockRef BB)) \
351
    macro(LLVMBasicBlockRef , GetEntryBasicBlock, (LLVMValueRef Fn)) \
352
    macro(LLVMBasicBlockRef , AppendBasicBlockInContext, (LLVMContextRef C, LLVMValueRef Fn, const char *Name)) \
353
    macro(LLVMBasicBlockRef , AppendBasicBlock, (LLVMValueRef Fn, const char *Name)) \
354
    macro(LLVMBasicBlockRef , InsertBasicBlockInContext, (LLVMContextRef C, LLVMBasicBlockRef BB, const char *Name)) \
355
    macro(LLVMBasicBlockRef , InsertBasicBlock, (LLVMBasicBlockRef InsertBeforeBB, const char *Name)) \
356
    macro(void , DeleteBasicBlock, (LLVMBasicBlockRef BB)) \
357
    macro(void , RemoveBasicBlockFromParent, (LLVMBasicBlockRef BB)) \
358
    macro(void , MoveBasicBlockBefore, (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)) \
359
    macro(void , MoveBasicBlockAfter, (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)) \
360
    macro(LLVMValueRef , GetFirstInstruction, (LLVMBasicBlockRef BB)) \
361
    macro(LLVMValueRef , GetLastInstruction, (LLVMBasicBlockRef BB)) \
362
    macro(int , HasMetadata, (LLVMValueRef Val)) \
363
    macro(LLVMValueRef , GetMetadata, (LLVMValueRef Val, unsigned KindID)) \
364
    macro(void , SetMetadata, (LLVMValueRef Val, unsigned KindID, LLVMValueRef Node)) \
365
    macro(LLVMBasicBlockRef , GetInstructionParent, (LLVMValueRef Inst)) \
366
    macro(LLVMValueRef , GetNextInstruction, (LLVMValueRef Inst)) \
367
    macro(LLVMValueRef , GetPreviousInstruction, (LLVMValueRef Inst)) \
368
    macro(void , InstructionEraseFromParent, (LLVMValueRef Inst)) \
369
    macro(LLVMOpcode , GetInstructionOpcode, (LLVMValueRef Inst)) \
370
    macro(LLVMIntPredicate , GetICmpPredicate, (LLVMValueRef Inst)) \
371
    macro(void , SetInstructionCallConv, (LLVMValueRef Instr, unsigned CC)) \
372
    macro(unsigned , GetInstructionCallConv, (LLVMValueRef Instr)) \
373
    macro(void , AddInstrAttribute, (LLVMValueRef Instr, unsigned index, LLVMAttribute)) \
374
    macro(void , RemoveInstrAttribute, (LLVMValueRef Instr, unsigned index, LLVMAttribute)) \
375
    macro(void , SetInstrParamAlignment, (LLVMValueRef Instr, unsigned index, unsigned align)) \
376
    macro(LLVMBool , IsTailCall, (LLVMValueRef CallInst)) \
377
    macro(void , SetTailCall, (LLVMValueRef CallInst, LLVMBool IsTailCall)) \
378
    macro(LLVMBasicBlockRef , GetSwitchDefaultDest, (LLVMValueRef SwitchInstr)) \
379
    macro(void , AddIncoming, (LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count)) \
380
    macro(unsigned , CountIncoming, (LLVMValueRef PhiNode)) \
381
    macro(LLVMValueRef , GetIncomingValue, (LLVMValueRef PhiNode, unsigned Index)) \
382
    macro(LLVMBasicBlockRef , GetIncomingBlock, (LLVMValueRef PhiNode, unsigned Index)) \
383
    macro(LLVMBuilderRef , CreateBuilderInContext, (LLVMContextRef C)) \
384
    macro(LLVMBuilderRef , CreateBuilder, (void)) \
385
    macro(void , PositionBuilder, (LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)) \
386
    macro(void , PositionBuilderBefore, (LLVMBuilderRef Builder, LLVMValueRef Instr)) \
387
    macro(void , PositionBuilderAtEnd, (LLVMBuilderRef Builder, LLVMBasicBlockRef Block)) \
388
    macro(LLVMBasicBlockRef , GetInsertBlock, (LLVMBuilderRef Builder)) \
389
    macro(void , ClearInsertionPosition, (LLVMBuilderRef Builder)) \
390
    macro(void , InsertIntoBuilder, (LLVMBuilderRef Builder, LLVMValueRef Instr)) \
391
    macro(void , InsertIntoBuilderWithName, (LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)) \
392
    macro(void , DisposeBuilder, (LLVMBuilderRef Builder)) \
393
    macro(void , SetCurrentDebugLocation, (LLVMBuilderRef Builder, LLVMValueRef L)) \
394
    macro(LLVMValueRef , GetCurrentDebugLocation, (LLVMBuilderRef Builder)) \
395
    macro(void , SetInstDebugLocation, (LLVMBuilderRef Builder, LLVMValueRef Inst)) \
396
    macro(LLVMValueRef , BuildRetVoid, (LLVMBuilderRef)) \
397
    macro(LLVMValueRef , BuildRet, (LLVMBuilderRef, LLVMValueRef V)) \
398
    macro(LLVMValueRef , BuildAggregateRet, (LLVMBuilderRef, LLVMValueRef *RetVals, unsigned N)) \
399
    macro(LLVMValueRef , BuildBr, (LLVMBuilderRef, LLVMBasicBlockRef Dest)) \
400
    macro(LLVMValueRef , BuildCondBr, (LLVMBuilderRef, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)) \
401
    macro(LLVMValueRef , BuildSwitch, (LLVMBuilderRef, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)) \
402
    macro(LLVMValueRef , BuildIndirectBr, (LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)) \
403
    macro(LLVMValueRef , BuildInvoke, (LLVMBuilderRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)) \
404
    macro(LLVMValueRef , BuildLandingPad, (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)) \
405
    macro(LLVMValueRef , BuildResume, (LLVMBuilderRef B, LLVMValueRef Exn)) \
406
    macro(LLVMValueRef , BuildUnreachable, (LLVMBuilderRef)) \
407
    macro(void , AddCase, (LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)) \
408
    macro(void , AddDestination, (LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)) \
409
    macro(void , AddClause, (LLVMValueRef LandingPad, LLVMValueRef ClauseVal)) \
410
    macro(void , SetCleanup, (LLVMValueRef LandingPad, LLVMBool Val)) \
411
    macro(LLVMValueRef , BuildAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
412
    macro(LLVMValueRef , BuildNSWAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
413
    macro(LLVMValueRef , BuildNUWAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
414
    macro(LLVMValueRef , BuildFAdd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
415
    macro(LLVMValueRef , BuildSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
416
    macro(LLVMValueRef , BuildNSWSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
417
    macro(LLVMValueRef , BuildNUWSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
418
    macro(LLVMValueRef , BuildFSub, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
419
    macro(LLVMValueRef , BuildMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
420
    macro(LLVMValueRef , BuildNSWMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
421
    macro(LLVMValueRef , BuildNUWMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
422
    macro(LLVMValueRef , BuildFMul, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
423
    macro(LLVMValueRef , BuildUDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
424
    macro(LLVMValueRef , BuildSDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
425
    macro(LLVMValueRef , BuildExactSDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
426
    macro(LLVMValueRef , BuildFDiv, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
427
    macro(LLVMValueRef , BuildURem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
428
    macro(LLVMValueRef , BuildSRem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
429
    macro(LLVMValueRef , BuildFRem, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
430
    macro(LLVMValueRef , BuildShl, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
431
    macro(LLVMValueRef , BuildLShr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
432
    macro(LLVMValueRef , BuildAShr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
433
    macro(LLVMValueRef , BuildAnd, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
434
    macro(LLVMValueRef , BuildOr, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
435
    macro(LLVMValueRef , BuildXor, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
436
    macro(LLVMValueRef , BuildBinOp, (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
437
    macro(LLVMValueRef , BuildNeg, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \
438
    macro(LLVMValueRef , BuildNSWNeg, (LLVMBuilderRef B, LLVMValueRef V, const char *Name)) \
439
    macro(LLVMValueRef , BuildNUWNeg, (LLVMBuilderRef B, LLVMValueRef V, const char *Name)) \
440
    macro(LLVMValueRef , BuildFNeg, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \
441
    macro(LLVMValueRef , BuildNot, (LLVMBuilderRef, LLVMValueRef V, const char *Name)) \
442
    macro(LLVMValueRef , BuildMalloc, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \
443
    macro(LLVMValueRef , BuildArrayMalloc, (LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)) \
444
    macro(LLVMValueRef , BuildAlloca, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \
445
    macro(LLVMValueRef , BuildArrayAlloca, (LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)) \
446
    macro(LLVMValueRef , BuildFree, (LLVMBuilderRef, LLVMValueRef PointerVal)) \
447
    macro(LLVMValueRef , BuildLoad, (LLVMBuilderRef, LLVMValueRef PointerVal, const char *Name)) \
448
    macro(LLVMValueRef , BuildStore, (LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)) \
449
    macro(LLVMValueRef , BuildGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)) \
450
    macro(LLVMValueRef , BuildInBoundsGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)) \
451
    macro(LLVMValueRef , BuildStructGEP, (LLVMBuilderRef B, LLVMValueRef Pointer, unsigned Idx, const char *Name)) \
452
    macro(LLVMValueRef , BuildGlobalString, (LLVMBuilderRef B, const char *Str, const char *Name)) \
453
    macro(LLVMValueRef , BuildGlobalStringPtr, (LLVMBuilderRef B, const char *Str, const char *Name)) \
454
    macro(LLVMBool , GetVolatile, (LLVMValueRef MemoryAccessInst)) \
455
    macro(void , SetVolatile, (LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)) \
456
    macro(LLVMValueRef , BuildTrunc, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
457
    macro(LLVMValueRef , BuildZExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
458
    macro(LLVMValueRef , BuildSExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
459
    macro(LLVMValueRef , BuildFPToUI, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
460
    macro(LLVMValueRef , BuildFPToSI, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
461
    macro(LLVMValueRef , BuildUIToFP, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
462
    macro(LLVMValueRef , BuildSIToFP, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
463
    macro(LLVMValueRef , BuildFPTrunc, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
464
    macro(LLVMValueRef , BuildFPExt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
465
    macro(LLVMValueRef , BuildPtrToInt, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
466
    macro(LLVMValueRef , BuildIntToPtr, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
467
    macro(LLVMValueRef , BuildBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
468
    macro(LLVMValueRef , BuildZExtOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
469
    macro(LLVMValueRef , BuildSExtOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
470
    macro(LLVMValueRef , BuildTruncOrBitCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
471
    macro(LLVMValueRef , BuildCast, (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
472
    macro(LLVMValueRef , BuildPointerCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
473
    macro(LLVMValueRef , BuildIntCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
474
    macro(LLVMValueRef , BuildFPCast, (LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)) \
475
    macro(LLVMValueRef , BuildICmp, (LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
476
    macro(LLVMValueRef , BuildFCmp, (LLVMBuilderRef, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
477
    macro(LLVMValueRef , BuildPhi, (LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)) \
478
    macro(LLVMValueRef , BuildCall, (LLVMBuilderRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)) \
479
    macro(LLVMValueRef , BuildSelect, (LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)) \
480
    macro(LLVMValueRef , BuildVAArg, (LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)) \
481
    macro(LLVMValueRef , BuildExtractElement, (LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)) \
482
    macro(LLVMValueRef , BuildInsertElement, (LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)) \
483
    macro(LLVMValueRef , BuildShuffleVector, (LLVMBuilderRef, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)) \
484
    macro(LLVMValueRef , BuildExtractValue, (LLVMBuilderRef, LLVMValueRef AggVal, unsigned Index, const char *Name)) \
485
    macro(LLVMValueRef , BuildInsertValue, (LLVMBuilderRef, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)) \
486
    macro(LLVMValueRef , BuildIsNull, (LLVMBuilderRef, LLVMValueRef Val, const char *Name)) \
487
    macro(LLVMValueRef , BuildIsNotNull, (LLVMBuilderRef, LLVMValueRef Val, const char *Name)) \
488
    macro(LLVMValueRef , BuildPtrDiff, (LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)) \
489
    macro(LLVMValueRef , BuildAtomicRMW, (LLVMBuilderRef B,LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)) \
490
    macro(, CreateModuleProviderForExistingModule, (LLVMModuleRef M)) \
491
    macro(void , DisposeModuleProvider, (LLVMModuleProviderRef M)) \
492
    macro(LLVMBool , CreateMemoryBufferWithContentsOfFile, (const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)) \
493
    macro(LLVMBool , CreateMemoryBufferWithSTDIN, (LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)) \
494
    macro(LLVMMemoryBufferRef , CreateMemoryBufferWithMemoryRange, (const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)) \
495
    macro(LLVMMemoryBufferRef , CreateMemoryBufferWithMemoryRangeCopy, (const char *InputData, size_t InputDataLength, const char *BufferName)) \
496
    macro(const char *, GetBufferStart, (LLVMMemoryBufferRef MemBuf)) \
497
    macro(size_t , GetBufferSize, (LLVMMemoryBufferRef MemBuf)) \
498
    macro(void , DisposeMemoryBuffer, (LLVMMemoryBufferRef MemBuf)) \
499
    macro(LLVMPassRegistryRef , GetGlobalPassRegistry, (void)) \
500
    macro(LLVMPassManagerRef , CreatePassManager, (void)) \
501
    macro(LLVMPassManagerRef , CreateFunctionPassManagerForModule, (LLVMModuleRef M)) \
502
    macro(LLVMPassManagerRef , CreateFunctionPassManager, (LLVMModuleProviderRef MP)) \
503
    macro(LLVMBool , RunPassManager, (LLVMPassManagerRef PM, LLVMModuleRef M)) \
504
    macro(LLVMBool , InitializeFunctionPassManager, (LLVMPassManagerRef FPM)) \
505
    macro(LLVMBool , RunFunctionPassManager, (LLVMPassManagerRef FPM, LLVMValueRef F)) \
506
    macro(LLVMBool , FinalizeFunctionPassManager, (LLVMPassManagerRef FPM)) \
507
    macro(void , DisposePassManager, (LLVMPassManagerRef PM)) \
508
    macro(LLVMBool , StartMultithreaded, ()) \
509
    macro(void , StopMultithreaded, ()) \
510
    macro(LLVMBool , IsMultithreaded, ()) \
511
    macro(LLVMTargetDataRef , CreateTargetData, (const char *StringRep)) \
512
    macro(void , AddTargetData, (LLVMTargetDataRef, LLVMPassManagerRef)) \
513
    macro(void , AddTargetLibraryInfo, (LLVMTargetLibraryInfoRef, LLVMPassManagerRef)) \
514
    macro(char *, CopyStringRepOfTargetData, (LLVMTargetDataRef)) \
515
    macro(enum LLVMByteOrdering , ByteOrder, (LLVMTargetDataRef)) \
516
    macro(unsigned , PointerSize, (LLVMTargetDataRef)) \
517
    macro(LLVMTypeRef , IntPtrType, (LLVMTargetDataRef)) \
518
    macro(unsigned long long , SizeOfTypeInBits, (LLVMTargetDataRef, LLVMTypeRef)) \
519
    macro(unsigned long long , StoreSizeOfType, (LLVMTargetDataRef, LLVMTypeRef)) \
520
    macro(unsigned long long , ABISizeOfType, (LLVMTargetDataRef, LLVMTypeRef)) \
521
    macro(unsigned , ABIAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \
522
    macro(unsigned , CallFrameAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \
523
    macro(unsigned , PreferredAlignmentOfType, (LLVMTargetDataRef, LLVMTypeRef)) \
524
    macro(unsigned , PreferredAlignmentOfGlobal, (LLVMTargetDataRef, LLVMValueRef GlobalVar)) \
525
    macro(unsigned , ElementAtOffset, (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned long long Offset)) \
526
    macro(unsigned long long , OffsetOfElement, (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned Element)) \
527
    macro(void , DisposeTargetData, (LLVMTargetDataRef)) \
528
    macro(LLVMTargetRef , GetFirstTarget, ()) \
529
    macro(LLVMTargetRef , GetNextTarget, (LLVMTargetRef T)) \
530
    macro(const char *, GetTargetName, (LLVMTargetRef T)) \
531
    macro(const char *, GetTargetDescription, (LLVMTargetRef T)) \
532
    macro(LLVMBool , TargetHasJIT, (LLVMTargetRef T)) \
533
    macro(LLVMBool , TargetHasTargetMachine, (LLVMTargetRef T)) \
534
    macro(LLVMBool , TargetHasAsmBackend, (LLVMTargetRef T)) \
535
    macro(LLVMTargetMachineRef , CreateTargetMachine, (LLVMTargetRef T, char *Triple, char *CPU, char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel)) \
536
    macro(void , DisposeTargetMachine, (LLVMTargetMachineRef T)) \
537
    macro(LLVMTargetRef , GetTargetMachineTarget, (LLVMTargetMachineRef T)) \
538
    macro(char *, GetTargetMachineTriple, (LLVMTargetMachineRef T)) \
539
    macro(char *, GetTargetMachineCPU, (LLVMTargetMachineRef T)) \
540
    macro(char *, GetTargetMachineFeatureString, (LLVMTargetMachineRef T)) \
541
    macro(LLVMTargetDataRef , GetTargetMachineData, (LLVMTargetMachineRef T)) \
542
    macro(LLVMBool , TargetMachineEmitToFile, (LLVMTargetMachineRef T, LLVMModuleRef M, char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage)) \
543
    macro(void , LinkInJIT, (void)) \
544
    macro(void , LinkInMCJIT, (void)) \
545
    macro(void , LinkInInterpreter, (void)) \
546
    macro(LLVMGenericValueRef , CreateGenericValueOfInt, (LLVMTypeRef Ty, unsigned long long N, LLVMBool IsSigned)) \
547
    macro(LLVMGenericValueRef , CreateGenericValueOfPointer, (void *P)) \
548
    macro(LLVMGenericValueRef , CreateGenericValueOfFloat, (LLVMTypeRef Ty, double N)) \
549
    macro(unsigned , GenericValueIntWidth, (LLVMGenericValueRef GenValRef)) \
550
    macro(unsigned long long , GenericValueToInt, (LLVMGenericValueRef GenVal, LLVMBool IsSigned)) \
551
    macro(void *, GenericValueToPointer, (LLVMGenericValueRef GenVal)) \
552
    macro(double , GenericValueToFloat, (LLVMTypeRef TyRef, LLVMGenericValueRef GenVal)) \
553
    macro(void , DisposeGenericValue, (LLVMGenericValueRef GenVal)) \
554
    macro(LLVMBool , CreateExecutionEngineForModule, (LLVMExecutionEngineRef *OutEE, LLVMModuleRef M, char **OutError)) \
555
    macro(LLVMBool , CreateInterpreterForModule, (LLVMExecutionEngineRef *OutInterp, LLVMModuleRef M, char **OutError)) \
556
    macro(LLVMBool , CreateJITCompilerForModule, (LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, unsigned OptLevel, char **OutError)) \
557
    macro(void , InitializeMCJITCompilerOptions, ( struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions)) \
558
    macro(LLVMBool , CreateMCJITCompilerForModule, ( LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions, char **OutError)) \
559
    macro(LLVMBool , CreateExecutionEngine, (LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, char **OutError)) \
560
    macro(LLVMBool , CreateInterpreter, (LLVMExecutionEngineRef *OutInterp, LLVMModuleProviderRef MP, char **OutError)) \
561
    macro(LLVMBool , CreateJITCompiler, (LLVMExecutionEngineRef *OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, char **OutError)) \
562
    macro(void , DisposeExecutionEngine, (LLVMExecutionEngineRef EE)) \
563
    macro(void , RunStaticConstructors, (LLVMExecutionEngineRef EE)) \
564
    macro(void , RunStaticDestructors, (LLVMExecutionEngineRef EE)) \
565
    macro(int , RunFunctionAsMain, (LLVMExecutionEngineRef EE, LLVMValueRef F, unsigned ArgC, const char * const *ArgV, const char * const *EnvP)) \
566
    macro(LLVMGenericValueRef , RunFunction, (LLVMExecutionEngineRef EE, LLVMValueRef F, unsigned NumArgs, LLVMGenericValueRef *Args)) \
567
    macro(void , FreeMachineCodeForFunction, (LLVMExecutionEngineRef EE, LLVMValueRef F)) \
568
    macro(void , AddModule, (LLVMExecutionEngineRef EE, LLVMModuleRef M)) \
569
    macro(void , AddModuleProvider, (LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP)) \
570
    macro(LLVMBool , RemoveModule, (LLVMExecutionEngineRef EE, LLVMModuleRef M, LLVMModuleRef *OutMod, char **OutError)) \
571
    macro(LLVMBool , RemoveModuleProvider, (LLVMExecutionEngineRef EE, LLVMModuleProviderRef MP, LLVMModuleRef *OutMod, char **OutError)) \
572
    macro(LLVMBool , FindFunction, (LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn)) \
573
    macro(void *, RecompileAndRelinkFunction, (LLVMExecutionEngineRef EE, LLVMValueRef Fn)) \
574
    macro(LLVMTargetDataRef , GetExecutionEngineTargetData, (LLVMExecutionEngineRef EE)) \
575
    macro(void , AddGlobalMapping, (LLVMExecutionEngineRef EE, LLVMValueRef Global, void* Addr)) \
576
    macro(void *, GetPointerToGlobal, (LLVMExecutionEngineRef EE, LLVMValueRef Global)) \
577
    macro(LLVMMCJITMemoryManagerRef , CreateSimpleMCJITMemoryManager, ( void *Opaque, LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, LLVMMemoryManagerDestroyCallback Destory)) \
578
    macro(void , DisposeMCJITMemoryManager, (LLVMMCJITMemoryManagerRef MM)) \
579
    macro(LLVMBool , VerifyModule, (LLVMModuleRef M, LLVMVerifierFailureAction Action, char **OutMessage)) \
580
    macro(LLVMBool , VerifyFunction, (LLVMValueRef Fn, LLVMVerifierFailureAction Action)) \
581
    macro(void , ViewFunctionCFG, (LLVMValueRef Fn)) \
582
    macro(void , ViewFunctionCFGOnly, (LLVMValueRef Fn)) \
583
    macro(LLVMDisasmContextRef , CreateDisasm, (const char *TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)) \
584
    macro(LLVMDisasmContextRef , CreateDisasmCPU, (const char *Triple, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)) \
585
    macro(int , SetDisasmOptions, (LLVMDisasmContextRef DC, uint64_t Options)) \
586
    macro(void , DisasmDispose, (LLVMDisasmContextRef DC)) \
587
    macro(size_t , DisasmInstruction, (LLVMDisasmContextRef DC, uint8_t *Bytes, uint64_t BytesSize, uint64_t PC, char *OutString, size_t OutStringSize)) \
588
    macro(unsigned , PointerSizeForAS, (LLVMTargetDataRef, unsigned AS)) \
589
    macro(LLVMTypeRef , IntPtrTypeForAS, (LLVMTargetDataRef, unsigned AS)) \
590
    macro(LLVMPassManagerBuilderRef , PassManagerBuilderCreate, (void)) \
591
    macro(void , PassManagerBuilderDispose, (LLVMPassManagerBuilderRef PMB)) \
592
    macro(, PassManagerBuilderSetOptLevel, (LLVMPassManagerBuilderRef PMB, unsigned OptLevel)) \
593
    macro(, PassManagerBuilderSetSizeLevel, (LLVMPassManagerBuilderRef PMB, unsigned SizeLevel)) \
594
    macro(, PassManagerBuilderSetDisableUnitAtATime, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \
595
    macro(, PassManagerBuilderSetDisableUnrollLoops, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \
596
    macro(, PassManagerBuilderSetDisableSimplifyLibCalls, (LLVMPassManagerBuilderRef PMB, LLVMBool Value)) \
597
    macro(, PassManagerBuilderUseInlinerWithThreshold, (LLVMPassManagerBuilderRef PMB, unsigned Threshold)) \
598
    macro(, PassManagerBuilderPopulateFunctionPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \
599
    macro(, PassManagerBuilderPopulateModulePassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \
600
    macro(void , PassManagerBuilderPopulateLTOPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner)) \
601
    macro(void , AddAggressiveDCEPass, (LLVMPassManagerRef PM)) \
602
    macro(void , AddCFGSimplificationPass, (LLVMPassManagerRef PM)) \
603
    macro(void , AddDeadStoreEliminationPass, (LLVMPassManagerRef PM)) \
604
    macro(void , AddGVNPass, (LLVMPassManagerRef PM)) \
605
    macro(void , AddIndVarSimplifyPass, (LLVMPassManagerRef PM)) \
606
    macro(void , AddInstructionCombiningPass, (LLVMPassManagerRef PM)) \
607
    macro(void , AddJumpThreadingPass, (LLVMPassManagerRef PM)) \
608
    macro(void , AddLICMPass, (LLVMPassManagerRef PM)) \
609
    macro(void , AddLoopDeletionPass, (LLVMPassManagerRef PM)) \
610
    macro(void , AddLoopIdiomPass, (LLVMPassManagerRef PM)) \
611
    macro(void , AddLoopRotatePass, (LLVMPassManagerRef PM)) \
612
    macro(void , AddLoopUnrollPass, (LLVMPassManagerRef PM)) \
613
    macro(void , AddLoopUnswitchPass, (LLVMPassManagerRef PM)) \
614
    macro(void , AddMemCpyOptPass, (LLVMPassManagerRef PM)) \
615
    macro(void , AddPartiallyInlineLibCallsPass, (LLVMPassManagerRef PM)) \
616
    macro(void , AddPromoteMemoryToRegisterPass, (LLVMPassManagerRef PM)) \
617
    macro(void , AddReassociatePass, (LLVMPassManagerRef PM)) \
618
    macro(void , AddSCCPPass, (LLVMPassManagerRef PM)) \
619
    macro(void , AddScalarReplAggregatesPass, (LLVMPassManagerRef PM)) \
620
    macro(void , AddScalarReplAggregatesPassSSA, (LLVMPassManagerRef PM)) \
621
    macro(void , AddScalarReplAggregatesPassWithThreshold, (LLVMPassManagerRef PM, int Threshold)) \
622
    macro(void , AddSimplifyLibCallsPass, (LLVMPassManagerRef PM)) \
623
    macro(void , AddTailCallEliminationPass, (LLVMPassManagerRef PM)) \
624
    macro(void , AddConstantPropagationPass, (LLVMPassManagerRef PM)) \
625
    macro(void , AddDemoteMemoryToRegisterPass, (LLVMPassManagerRef PM)) \
626
    macro(void , AddVerifierPass, (LLVMPassManagerRef PM)) \
627
    macro(void , AddCorrelatedValuePropagationPass, (LLVMPassManagerRef PM)) \
628
    macro(void , AddEarlyCSEPass, (LLVMPassManagerRef PM)) \
629
    macro(void , AddLowerExpectIntrinsicPass, (LLVMPassManagerRef PM)) \
630
    macro(void , AddTypeBasedAliasAnalysisPass, (LLVMPassManagerRef PM)) \
631
    macro(void , AddBasicAliasAnalysisPass, (LLVMPassManagerRef PM))
632
633
#endif // LLVMAPIFunctions_h
634
- Source/JavaScriptCore/llvm/library/LLVMExports.cpp +47 lines
Line 0 Source/JavaScriptCore/llvm/library/LLVMExports.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "LLVMHeaders.h"
28
29
extern "C" JSC::LLVMAPI* initializeAndGetJSCLLVMAPI();
30
31
extern "C" JSC::LLVMAPI* initializeAndGetJSCLLVMAPI()
32
{
33
    LLVMLinkInMCJIT();
34
    LLVMInitializeNativeTarget();
35
    LLVMInitializeX86AsmPrinter();
36
    LLVMInitializeX86Disassembler();
37
    
38
    JSC::LLVMAPI* result = new JSC::LLVMAPI;
39
    
40
#define LLVM_API_FUNCTION_ASSIGNMENT(returnType, name, signature) \
41
    result->name = LLVM##name;
42
    FOR_EACH_LLVM_API_FUNCTION(LLVM_API_FUNCTION_ASSIGNMENT);
43
#undef LLVM_API_FUNCTION_ASSIGNMENT
44
    
45
    return result;
46
}
47
- Source/JavaScriptCore/llvm/library/LLVMOverrides.cpp +30 lines
Line 0 Source/JavaScriptCore/llvm/library/LLVMOverrides.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
28
extern "C" int __cxa_atexit();
29
extern "C" int __cxa_atexit() { return 0; }
30
- Source/JavaScriptCore/runtime/InitializeThreading.cpp -16 / +2 lines
Lines 34-39 Source/JavaScriptCore/runtime/InitializeThreading.cpp_sec1
34
#include "HeapStatistics.h"
34
#include "HeapStatistics.h"
35
#include "Options.h"
35
#include "Options.h"
36
#include "Identifier.h"
36
#include "Identifier.h"
37
#include "InitializeLLVM.h"
37
#include "JSDateMath.h"
38
#include "JSDateMath.h"
38
#include "JSGlobalObject.h"
39
#include "JSGlobalObject.h"
39
#include "JSLock.h"
40
#include "JSLock.h"
Lines 71-92 static void initializeThreadingOnce() Source/JavaScriptCore/runtime/InitializeThreading.cpp_sec2
71
    LLInt::initialize();
72
    LLInt::initialize();
72
#endif
73
#endif
73
#if HAVE(LLVM)
74
#if HAVE(LLVM)
74
    bool ftl = false;
75
    initializeLLVM();
75
    bool disassembler = false;
76
#if ENABLE(FTL_JIT)
77
    ftl = true;
78
#endif
79
#if USE(LLVM_DISASSEMBLER)
80
    disassembler = true;
81
#endif
82
    if (ftl)
83
        LLVMLinkInMCJIT();
84
    if (ftl || disassembler)
85
        LLVMInitializeNativeTarget();
86
    if (ftl)
87
        LLVMInitializeX86AsmPrinter();
88
    if (disassembler)
89
        LLVMInitializeX86Disassembler();
90
#endif // HAVE(LLVM)
76
#endif // HAVE(LLVM)
91
}
77
}
92
78

Return to Bug 122566