diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-07-15 16:08:08 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-07-15 16:08:08 -0700 |
commit | e789858899a7b36caf11b371a97411a1582a482b (patch) | |
tree | e8c28b178b32010f73b477b3c65b5ff74437530c /tools/driver/cc1_main.cpp | |
parent | 99a5501f5ae5b75017dfc386d4abf648234e85df (diff) | |
parent | 20c7d45a4da9f58ad805ad1d37f92fe7dc232ec8 (diff) |
Merge commit '20c7d45a4da9f58ad805ad1d37f92fe7dc232ec8'
Conflicts:
lib/CodeGen/ItaniumCXXABI.cpp
Diffstat (limited to 'tools/driver/cc1_main.cpp')
-rw-r--r-- | tools/driver/cc1_main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp index f54c87898c..35cf5b8735 100644 --- a/tools/driver/cc1_main.cpp +++ b/tools/driver/cc1_main.cpp @@ -39,7 +39,8 @@ using namespace clang; // Main driver //===----------------------------------------------------------------------===// -static void LLVMErrorHandler(void *UserData, const std::string &Message) { +static void LLVMErrorHandler(void *UserData, const std::string &Message, + bool GenCrashDiag) { DiagnosticsEngine &Diags = *static_cast<DiagnosticsEngine*>(UserData); Diags.Report(diag::err_fe_error_backend) << Message; @@ -49,9 +50,9 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message) { llvm::sys::RunInterruptHandlers(); // We cannot recover from llvm errors. When reporting a fatal error, exit - // with status 70. For BSD systems this is defined as an internal software - // error. This notifies the driver to report diagnostics information. - exit(70); + // with status 70 to generate crash diagnostics. For BSD systems this is + // defined as an internal software error. Otherwise, exit with status 1. + exit(GenCrashDiag ? 70 : 1); } int cc1_main(const char **ArgBegin, const char **ArgEnd, |