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
4646)
4747
4848set (llvm_libs
49+ LLVMAggressiveInstCombine
50+ LLVMAnalysis
51+ LLVMAsmPrinter
4952 LLVMBinaryFormat
53+ LLVMBitReader
54+ LLVMBitWriter
55+ LLVMBitstreamReader
56+ LLVMCodeGen
5057 LLVMCore
58+ LLVMDebugInfoCodeView
59+ LLVMDebugInfoDWARF
60+ LLVMDebugInfoMSF
5161 LLVMDemangle
62+ LLVMGlobalISel
63+ LLVMInstCombine
64+ LLVMMC
65+ LLVMMCDisassembler
66+ LLVMMCParser
67+ LLVMObject
68+ LLVMProfileData
5269 LLVMRemarks
70+ LLVMScalarOpts
71+ LLVMSelectionDAG
5372 LLVMSupport
73+ LLVMTarget
74+ LLVMTransformUtils
75+ LLVMX86AsmParser
76+ LLVMX86CodeGen
77+ LLVMX86Desc
78+ LLVMX86Info
79+ LLVMX86Utils
5480)
5581
5682separate_arguments (LLVM_DEFINITIONS)
Original file line number Diff line number Diff line change 11#include < llvm/Support/Format.h>
2+ #include < llvm/Support/InitLLVM.h>
3+ #include < llvm/Support/TargetSelect.h>
24#include < llvm/Support/raw_ostream.h>
35
46using namespace llvm ;
@@ -37,6 +39,12 @@ int *integerDistances(const int (&x)[sizeOfArray], int *y) {
3739}
3840
3941int main (int argc, char **argv) {
42+ InitLLVM X (argc, argv);
43+
44+ InitializeNativeTarget ();
45+ InitializeNativeTargetAsmPrinter ();
46+ InitializeNativeTargetAsmParser ();
47+
4048 int x[]{0 , 1 , 2 };
4149 int y[]{3 , 1 , -1 };
4250 int *z = integerDistances (x, y);
You can’t perform that action at this time.
0 commit comments