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 99#include " llvm/ExecutionEngine/Orc/CompileUtils.h"
1010
1111#include " llvm/ADT/SmallVector.h"
12+ #include " llvm/CodeGen/MachineModuleInfo.h"
1213#include " llvm/ExecutionEngine/ObjectCache.h"
1314#include " llvm/IR/LegacyPassManager.h"
1415#include " llvm/IR/Module.h"
@@ -46,8 +47,9 @@ Expected<SimpleCompiler::CompileResult> SimpleCompiler::operator()(Module &M) {
4647 raw_svector_ostream ObjStream (ObjBufferSV);
4748
4849 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))
5153 return make_error<StringError>(" Target does not support MC emission" ,
5254 inconvertibleErrorCode ());
5355 PM.run (M);
You can’t perform that action at this time.
0 commit comments