diff options
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 4c65457d0e4..d3ef4154c51 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -450,8 +450,9 @@ static int compileModule(char **argv, LLVMContext &Context) { LLVMTargetMachine &LLVMTM = static_cast<LLVMTargetMachine&>(*Target); TargetPassConfig &TPC = *LLVMTM.createPassConfig(PM); PM.add(&TPC); - PM.add(new MachineModuleInfo(&LLVMTM)); - LLVMTM.addMachineFunctionAnalysis(PM, MIR.get()); + MachineModuleInfo *MMI = new MachineModuleInfo(&LLVMTM); + MMI->setMachineFunctionInitializer(MIR.get()); + PM.add(MMI); TPC.printAndVerify(""); for (const std::string &RunPassName : *RunPassNames) { |

