From 74d4527e4038bf0e9a0e11edf09adf80c38eed85 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Feb 2004 17:32:54 +0000 Subject: [PATCH] Bugpoint will be throwing exceptions soon, perpare for the worst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11584 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/bugpoint.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 9bca7fd6fcb..779359e73c5 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -18,7 +18,6 @@ #include "Support/CommandLine.h" #include "Config/unistd.h" #include - using namespace llvm; static cl::list @@ -51,5 +50,11 @@ int main(int argc, char **argv) { perror("setrlimit: RLIMIT_CORE"); } - return D.run(); + try { + return D.run(); + } catch (...) { + std::cerr << "Whoops, an exception leaked out of bugpoint. " + << "This is a bug in bugpoint!\n"; + return 1; + } }