[cfe-commits] r167754 - in /cfe/trunk/tools/driver: cc1_main.cpp driver.cpp
Chad Rosier
mcrosier at apple.com
Mon Nov 12 13:32:24 PST 2012
Author: mcrosier
Date: Mon Nov 12 15:32:24 2012
New Revision: 167754
URL: http://llvm.org/viewvc/llvm-project?rev=167754&view=rev
Log:
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
Modified:
cfe/trunk/tools/driver/cc1_main.cpp
cfe/trunk/tools/driver/driver.cpp
Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=167754&r1=167753&r2=167754&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Mon Nov 12 15:32:24 2012
@@ -48,8 +48,10 @@
// 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,
Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=167754&r1=167753&r2=167754&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Mon Nov 12 15:32:24 2012
@@ -480,8 +480,9 @@
Res = -1;
// If result status is < 0, then the driver command signalled an error.
- // In this case, generate additional diagnostic information if possible.
- if (Res < 0)
+ // If result status is 70, then the driver command reported a fatal error.
+ // In these cases, generate additional diagnostic information if possible.
+ if (Res < 0 || Res == 70)
TheDriver.generateCompilationDiagnostics(*C, FailingCommand);
// If any timers were active but haven't been destroyed yet, print their
More information about the cfe-commits
mailing list