diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-21 20:03:44 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-21 20:03:44 +0000 |
commit | 7cebf36a9586f11a02077059c37701f7c020f573 (patch) | |
tree | d14f5ce12832e4a03f75ffa28714cfbd2c7693c7 /llvm/tools/opt/opt.cpp | |
parent | b245ecac79459de6db2d1443190a1e67eac56fff (diff) | |
download | bcm5719-llvm-7cebf36a9586f11a02077059c37701f7c020f573.tar.gz bcm5719-llvm-7cebf36a9586f11a02077059c37701f7c020f573.zip |
Move some logic to populateLTOPassManager.
This will avoid code duplication in the next commit which calls it directly
from the gold plugin.
llvm-svn: 216211
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 65250b67da1..9a0c9a42089 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -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); |