PassManagerBuilder: Remove effectively dead 'StripDebug' option

`StripDebug` was only used by tools/opt/opt.cpp in
`AddStandardLinkPasses()`, but opt.cpp adds the same pass based on its
command-line flag before it calls `AddStandardLinkPasses()`.  Stripping
debug info twice isn't very useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-03-19 21:37:17 +00:00
parent 3d930d4e83
commit 0dda07ad4d
3 changed files with 2 additions and 9 deletions

View File

@ -120,7 +120,6 @@ public:
bool DisableGVNLoadPRE;
bool VerifyInput;
bool VerifyOutput;
bool StripDebug;
bool MergeFunctions;
private:

View File

@ -97,7 +97,6 @@ PassManagerBuilder::PassManagerBuilder() {
DisableGVNLoadPRE = false;
VerifyInput = false;
VerifyOutput = false;
StripDebug = false;
MergeFunctions = false;
}
@ -512,14 +511,10 @@ void PassManagerBuilder::populateLTOPassManager(legacy::PassManagerBase &PM) {
if (LibraryInfo)
PM.add(new TargetLibraryInfoWrapperPass(*LibraryInfo));
if (VerifyInput)
if (VerifyInput) {
PM.add(createVerifierPass());
if (StripDebug)
PM.add(createStripSymbolsPass(true));
if (VerifyInput)
PM.add(createDebugInfoVerifierPass());
}
if (OptLevel != 0)
addLTOOptimizationPasses(PM);

View File

@ -234,7 +234,6 @@ static void AddOptimizationPasses(legacy::PassManagerBase &MPM,
static void AddStandardLinkPasses(legacy::PassManagerBase &PM) {
PassManagerBuilder Builder;
Builder.VerifyInput = true;
Builder.StripDebug = StripDebug;
if (DisableOptimizations)
Builder.OptLevel = 0;