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

llvm-svn: 5917
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 2148e40..5451888 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -64,11 +64,12 @@
 /// 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;
 }