Cleanup and simplify manipulation of the program, eliminate the need for so
[oota-llvm.git] / tools / bugpoint / BugDriver.cpp
index 14e5606f6c669da7247c9dd7b4e967df53dc6e7d..4359622777ff3da04a7315d6e055fcd3ee32f37c 100644 (file)
@@ -38,6 +38,15 @@ namespace {
                                 "(for miscompilation detection)"));
 }
 
+/// setNewProgram - If we reduce or update the program somehow, call this method
+/// to update bugdriver with it.  This deletes the old module and sets the
+/// specified one as the current program.
+void BugDriver::setNewProgram(Module *M) {
+  delete Program;
+  Program = M;
+}
+
+
 /// getPassesString - Turn a list of passes into a string which indicates the
 /// command line options that must be passed to add the passes.
 ///
@@ -174,7 +183,7 @@ bool BugDriver::run() {
       return debugMiscompilation();
     }
   } catch (ToolExecutionError &TEE) {
-    std::cerr << TEE.getMessage() << "*** Debugging code generator crash!\n";
+    std::cerr << TEE.getMessage();
     return debugCodeGeneratorCrash();
   }