mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +00:00
Move some logic to populateLTOPassManager.
This will avoid code duplication in the next commit which calls it directly from the gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -254,18 +254,12 @@ static void AddStandardCompilePasses(PassManagerBase &PM) {
|
||||
}
|
||||
|
||||
static void AddStandardLinkPasses(PassManagerBase &PM) {
|
||||
PM.add(createVerifierPass()); // Verify that input is correct
|
||||
|
||||
// If the -strip-debug command line option was specified, do it.
|
||||
if (StripDebug)
|
||||
addPass(PM, createStripSymbolsPass(true));
|
||||
|
||||
// Verify debug info only after it's (possibly) stripped.
|
||||
PM.add(createDebugInfoVerifierPass());
|
||||
|
||||
if (DisableOptimizations) return;
|
||||
|
||||
PassManagerBuilder Builder;
|
||||
Builder.VerifyInput = true;
|
||||
Builder.StripDebug = StripDebug;
|
||||
if (DisableOptimizations)
|
||||
Builder.OptLevel = 0;
|
||||
|
||||
if (!DisableInline)
|
||||
Builder.Inliner = createFunctionInliningPass();
|
||||
Builder.populateLTOPassManager(PM);
|
||||
|
Reference in New Issue
Block a user