This repository was archived by the owner on Jul 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,37 @@ target_include_directories(JitFromScratch PRIVATE
46
46
)
47
47
48
48
set (llvm_libs
49
+ LLVMAggressiveInstCombine
50
+ LLVMAnalysis
51
+ LLVMAsmPrinter
49
52
LLVMBinaryFormat
53
+ LLVMBitReader
54
+ LLVMBitWriter
55
+ LLVMBitstreamReader
56
+ LLVMCodeGen
50
57
LLVMCore
58
+ LLVMDebugInfoCodeView
59
+ LLVMDebugInfoDWARF
60
+ LLVMDebugInfoMSF
51
61
LLVMDemangle
62
+ LLVMGlobalISel
63
+ LLVMInstCombine
64
+ LLVMMC
65
+ LLVMMCDisassembler
66
+ LLVMMCParser
67
+ LLVMObject
68
+ LLVMProfileData
52
69
LLVMRemarks
70
+ LLVMScalarOpts
71
+ LLVMSelectionDAG
53
72
LLVMSupport
73
+ LLVMTarget
74
+ LLVMTransformUtils
75
+ LLVMX86AsmParser
76
+ LLVMX86CodeGen
77
+ LLVMX86Desc
78
+ LLVMX86Info
79
+ LLVMX86Utils
54
80
)
55
81
56
82
separate_arguments (LLVM_DEFINITIONS )
Original file line number Diff line number Diff line change 1
1
#include < llvm/Support/Format.h>
2
+ #include < llvm/Support/InitLLVM.h>
3
+ #include < llvm/Support/TargetSelect.h>
2
4
#include < llvm/Support/raw_ostream.h>
3
5
4
6
using namespace llvm ;
@@ -37,6 +39,12 @@ int *integerDistances(const int (&x)[sizeOfArray], int *y) {
37
39
}
38
40
39
41
int main (int argc, char **argv) {
42
+ InitLLVM X (argc, argv);
43
+
44
+ InitializeNativeTarget ();
45
+ InitializeNativeTargetAsmPrinter ();
46
+ InitializeNativeTargetAsmParser ();
47
+
40
48
int x[]{0 , 1 , 2 };
41
49
int y[]{3 , 1 , -1 };
42
50
int *z = integerDistances (x, y);
You can’t perform that action at this time.
0 commit comments