mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Respect LibraryInfo in populateLTOPassManager and use it. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -466,11 +466,9 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
|
||||
mergedModule->setDataLayout(TargetMach->getSubtargetImpl()->getDataLayout());
|
||||
passes.add(new DataLayoutPass(mergedModule));
|
||||
|
||||
// Add appropriate TargetLibraryInfo for this module.
|
||||
passes.add(new TargetLibraryInfo(Triple(TargetMach->getTargetTriple())));
|
||||
|
||||
TargetMach->addAnalysisPasses(passes);
|
||||
|
||||
Triple TargetTriple(TargetMach->getTargetTriple());
|
||||
// Enabling internalize here would use its AllButMain variant. It
|
||||
// keeps only main if it exists and does nothing for libraries. Instead
|
||||
// we create the pass ourselves with the symbol list provided by the linker.
|
||||
@ -479,6 +477,7 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
|
||||
PMB.DisableGVNLoadPRE = DisableGVNLoadPRE;
|
||||
if (!DisableInline)
|
||||
PMB.Inliner = createFunctionInliningPass();
|
||||
PMB.LibraryInfo = new TargetLibraryInfo(TargetTriple);
|
||||
PMB.populateLTOPassManager(passes);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user