summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-30 05:36:08 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-30 05:36:08 +0000
commit996ec72d48e86d16dc14b1c014be4c13d2f1f686 (patch)
tree388b95aebb8676f1fcbf8447e60a06c6223ed613 /llvm/tools/llvmc
parenta6d9c1415ce032235324f70cd074a4bad4c1cb86 (diff)
downloadbcm5719-llvm-996ec72d48e86d16dc14b1c014be4c13d2f1f686.tar.gz
bcm5719-llvm-996ec72d48e86d16dc14b1c014be4c13d2f1f686.zip
For PR351:
* Place a try/catch block around the entire tool to Make sure std::string exceptions are caught and printed before exiting the tool. * Make sure we catch unhandled exceptions at the top level so that we don't abort with a useless message but indicate than an unhandled exception was generated. llvm-svn: 19192
Diffstat (limited to 'llvm/tools/llvmc')
-rw-r--r--llvm/tools/llvmc/llvmc.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvmc/llvmc.cpp b/llvm/tools/llvmc/llvmc.cpp
index fe365058945..fd416b2b57c 100644
--- a/llvm/tools/llvmc/llvmc.cpp
+++ b/llvm/tools/llvmc/llvmc.cpp
@@ -368,4 +368,5 @@ int main(int argc, char **argv) {
} catch (...) {
std::cerr << argv[0] << ": Unexpected unknown exception occurred.\n";
}
+ return 1;
}
OpenPOWER on IntegriCloud