Skip to content

Commit 5db347b

Browse files
vchuravyvtjnash
authored andcommitted
update to LLVM10 changes
1 parent 2034b2c commit 5db347b

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

src/jitlayers.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include <llvm/Support/SmallVectorMemoryBuffer.h>
4141
#endif
4242

43+
#if JL_LLVM_VERSION >= 100000
44+
#include <llvm/Support/CodeGen.h>
45+
#endif
46+
4347
namespace llvm {
4448
extern Pass *createLowerSimdLoopPass();
4549
}
@@ -73,6 +77,10 @@ using namespace llvm;
7377
#include "jitlayers.h"
7478
#include "julia_assert.h"
7579

80+
#if JL_LLVM_VERSION < 100000
81+
static const TargetMachine::CodeGenFileType CGFT_ObjectFile = TargetMachine::CGFT_ObjectFile;
82+
#endif
83+
7684
RTDyldMemoryManager* createRTDyldMemoryManager(void);
7785

7886
static IntegerType *T_uint32;
@@ -1029,11 +1037,11 @@ void jl_dump_native(const char *bc_fname, const char *unopt_bc_fname, const char
10291037
PM.add(createBitcodeWriterPass(bc_OS));
10301038
#if JL_LLVM_VERSION >= 70000
10311039
if (obj_fname)
1032-
if (TM->addPassesToEmitFile(PM, obj_OS, nullptr, TargetMachine::CGFT_ObjectFile, false))
1040+
if (TM->addPassesToEmitFile(PM, obj_OS, nullptr, CGFT_ObjectFile, false))
10331041
jl_safe_printf("ERROR: target does not support generation of object files\n");
10341042
#else
10351043
if (obj_fname)
1036-
if (TM->addPassesToEmitFile(PM, obj_OS, TargetMachine::CGFT_ObjectFile, false))
1044+
if (TM->addPassesToEmitFile(PM, obj_OS, CGFT_ObjectFile, false))
10371045
jl_safe_printf("ERROR: target does not support generation of object files\n");
10381046
#endif
10391047

src/llvm-alloc-opt.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#include <llvm/Support/Debug.h>
2525
#include <llvm/Transforms/Utils/PromoteMemToReg.h>
2626

27+
#if JL_LLVM_VERSION >= 100000
28+
#include <llvm/InitializePasses.h>
29+
#endif
30+
2731
#include "codegen_shared.h"
2832
#include "julia.h"
2933
#include "julia_internal.h"

src/llvm-late-gc-lowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
#include <llvm/Transforms/Utils/ModuleUtils.h>
2727

2828
#include "llvm-version.h"
29+
30+
#if JL_LLVM_VERSION >= 100000
31+
#include <llvm/InitializePasses.h>
32+
#endif
33+
2934
#include "codegen_shared.h"
3035
#include "julia.h"
3136
#include "julia_internal.h"

0 commit comments

Comments
 (0)