summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 2148e405f53..5451888c4f3 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -64,11 +64,12 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
/// before handing it to the user...
///
Module *BugDriver::performFinalCleanups() const {
+ Module *M = CloneModule(Program);
PassManager CleanupPasses;
CleanupPasses.add(createFunctionResolvingPass());
CleanupPasses.add(createGlobalDCEPass());
+ CleanupPasses.add(createDeadTypeEliminationPass());
CleanupPasses.add(createVerifierPass());
- Module *M = CloneModule(Program);
CleanupPasses.run(*M);
return M;
}
OpenPOWER on IntegriCloud