File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
llvm/lib/ExecutionEngine/Orc Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 9
9
#include " llvm/ExecutionEngine/Orc/CompileUtils.h"
10
10
11
11
#include " llvm/ADT/SmallVector.h"
12
+ #include " llvm/CodeGen/MachineModuleInfo.h"
12
13
#include " llvm/ExecutionEngine/ObjectCache.h"
13
14
#include " llvm/IR/LegacyPassManager.h"
14
15
#include " llvm/IR/Module.h"
@@ -46,8 +47,9 @@ Expected<SimpleCompiler::CompileResult> SimpleCompiler::operator()(Module &M) {
46
47
raw_svector_ostream ObjStream (ObjBufferSV);
47
48
48
49
legacy::PassManager PM;
49
- MCContext *Ctx;
50
- if (TM.addPassesToEmitMC (PM, Ctx, ObjStream))
50
+ auto *LLVMTM = static_cast <LLVMTargetMachine *>(&TM);
51
+ MachineModuleInfo MMI (LLVMTM);
52
+ if (LLVMTM->addPassesToEmitMC (PM, MMI, ObjStream))
51
53
return make_error<StringError>(" Target does not support MC emission" ,
52
54
inconvertibleErrorCode ());
53
55
PM.run (M);
You can’t perform that action at this time.
0 commit comments