When cleaning up the final bytecode file, make sure to run DTE as well
authorChris Lattner <sabre@nondot.org>
Fri, 25 Apr 2003 00:52:30 +0000 (00:52 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Apr 2003 00:52:30 +0000 (00:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5917 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/ExtractFunction.cpp

index 2148e405f53f3e9da2f86d1bd194e4f00c60fe70..5451888c4f3816fa48ddcd2ff0b2b38822c9815a 100644 (file)
@@ -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;
 }