summaryrefslogtreecommitdiff
path: root/tools/bugpoint/bugpoint.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-27 01:30:37 +0000
committerDan Gohman <gohman@apple.com>2009-04-27 01:30:37 +0000
commit0324205bbb0ea8fb70e2bdfd5ea201c3a5fc24ec (patch)
tree530df48f05520a5d1d53af5aff6c6c7fa3ae1ffb /tools/bugpoint/bugpoint.cpp
parentf9a3ec86c138177c7d9b3a9d119e6d2247d14bd8 (diff)
downloadllvm-0324205bbb0ea8fb70e2bdfd5ea201c3a5fc24ec.tar.gz
llvm-0324205bbb0ea8fb70e2bdfd5ea201c3a5fc24ec.tar.bz2
llvm-0324205bbb0ea8fb70e2bdfd5ea201c3a5fc24ec.tar.xz
Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/bugpoint.cpp')
-rw-r--r--tools/bugpoint/bugpoint.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index 543512ce62..20f0e99a84 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -88,6 +88,14 @@ int main(int argc, char **argv) {
std::cerr << "Tool execution error: " << TEE.what() << '\n';
} catch (const std::string& msg) {
std::cerr << argv[0] << ": " << msg << "\n";
+ } catch (const std::bad_alloc &e) {
+ std::cerr << "Oh no, a bugpoint process ran out of memory!\n"
+ "To increase the allocation limits for bugpoint child\n"
+ "processes, use the -mlimit option.\n";
+ } catch (const std::exception &e) {
+ std::cerr << "Whoops, a std::exception leaked out of bugpoint: "
+ << e.what() << "\n"
+ << "This is a bug in bugpoint!\n";
} catch (...) {
std::cerr << "Whoops, an exception leaked out of bugpoint. "
<< "This is a bug in bugpoint!\n";