Skip to content

Commit 4ca0afb

Browse files
committed
Migrated LTOBackend.cpp to use the new TargetMachine MC emission API.
1 parent 4cfc73e commit 4ca0afb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,14 @@ static void codegen(const Config &Conf, TargetMachine *TM,
418418
TM->Options.ObjectFilenameForDebug = Stream->ObjectPathName;
419419

420420
legacy::PassManager CodeGenPasses;
421+
MachineModuleInfo MMI(static_cast<LLVMTargetMachine*>(TM));
421422
TargetLibraryInfoImpl TLII(Triple(Mod.getTargetTriple()));
422423
CodeGenPasses.add(new TargetLibraryInfoWrapperPass(TLII));
423424
CodeGenPasses.add(
424425
createImmutableModuleSummaryIndexWrapperPass(&CombinedIndex));
425426
if (Conf.PreCodeGenPassesHook)
426427
Conf.PreCodeGenPassesHook(CodeGenPasses);
427-
if (TM->addPassesToEmitFile(CodeGenPasses, *Stream->OS,
428+
if (TM->addPassesToEmitFile(CodeGenPasses, MMI, *Stream->OS,
428429
DwoOut ? &DwoOut->os() : nullptr,
429430
Conf.CGFileType))
430431
report_fatal_error("Failed to setup codegen");

0 commit comments

Comments
 (0)