diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-11-12 21:32:24 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-11-12 21:32:24 +0000 |
commit | 5af8de8c7255ca4df52cbb0d5e0d28d67c53524c (patch) | |
tree | 5b729585d328ee11c5ee091dedfe31b47e33940b /tools/driver/cc1_main.cpp | |
parent | 3078353fb56772193b9304510048ac075a2c95b5 (diff) |
If we encounter 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.
rdar://11951540
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver/cc1_main.cpp')
-rw-r--r-- | tools/driver/cc1_main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp index 674f2adbbc..9da6723d5f 100644 --- a/tools/driver/cc1_main.cpp +++ b/tools/driver/cc1_main.cpp @@ -48,8 +48,10 @@ static void LLVMErrorHandler(void *UserData, const std::string &Message) { // particular that we remove files registered with RemoveFileOnSignal. llvm::sys::RunInterruptHandlers(); - // We cannot recover from llvm errors. - exit(1); + // 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); } int cc1_main(const char **ArgBegin, const char **ArgEnd, |