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
diff --git a/llvm/tools/llvmc/llvmc.cpp b/llvm/tools/llvmc/llvmc.cpp
index fe36505..fd416b2 100644
--- a/llvm/tools/llvmc/llvmc.cpp
+++ b/llvm/tools/llvmc/llvmc.cpp
@@ -368,4 +368,5 @@
   } catch (...) {
     std::cerr << argv[0] << ": Unexpected unknown exception occurred.\n";
   }
+  return 1;
 }