aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/bugpoint/bugpoint.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index 779359e73c..3c89dce525 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -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 @@ int main(int argc, char **argv) {
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";