[llvm-commits] CVS: llvm/tools/bugpoint/bugpoint.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Feb 18 15:09:44 PST 2004


Changes in directory llvm/tools/bugpoint:

bugpoint.cpp updated: 1.12 -> 1.13

---
Log message:

Catch exception and print message as appropriate


---
Diffs of the changes:  (+4 -0)

Index: llvm/tools/bugpoint/bugpoint.cpp
diff -u llvm/tools/bugpoint/bugpoint.cpp:1.12 llvm/tools/bugpoint/bugpoint.cpp:1.13
--- llvm/tools/bugpoint/bugpoint.cpp:1.12	Wed Feb 18 11:32:54 2004
+++ llvm/tools/bugpoint/bugpoint.cpp	Wed Feb 18 14:22:11 2004
@@ -15,6 +15,7 @@
 
 #include "BugDriver.h"
 #include "llvm/Support/PassNameParser.h"
+#include "llvm/Support/ToolRunner.h"
 #include "Support/CommandLine.h"
 #include "Config/unistd.h"
 #include <sys/resource.h>
@@ -52,6 +53,9 @@
 
   try {
     return D.run();
+  } catch (ToolExecutionError &TEE) {
+    std::cerr << "Tool execution error: " << TEE.getMessage() << "\n";
+    return 1;
   } catch (...) {
     std::cerr << "Whoops, an exception leaked out of bugpoint.  "
               << "This is a bug in bugpoint!\n";





More information about the llvm-commits mailing list