When cleaning up the final bytecode file, make sure to run DTE as well

llvm-svn: 5917
This commit is contained in:
Chris Lattner 2003-04-25 00:52:30 +00:00
parent 0cd5d533d0
commit b0143880f4
1 changed files with 2 additions and 1 deletions

View 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;
}