summaryrefslogtreecommitdiff
path: root/tools/driver/driver.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-11-12 21:32:24 +0000
committerChad Rosier <mcrosier@apple.com>2012-11-12 21:32:24 +0000
commit5af8de8c7255ca4df52cbb0d5e0d28d67c53524c (patch)
tree5b729585d328ee11c5ee091dedfe31b47e33940b /tools/driver/driver.cpp
parent3078353fb56772193b9304510048ac075a2c95b5 (diff)
downloadclang-5af8de8c7255ca4df52cbb0d5e0d28d67c53524c.tar.gz
clang-5af8de8c7255ca4df52cbb0d5e0d28d67c53524c.tar.bz2
clang-5af8de8c7255ca4df52cbb0d5e0d28d67c53524c.tar.xz
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/driver.cpp')
-rw-r--r--tools/driver/driver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index 81979ec726..8233247c90 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -480,8 +480,9 @@ int main(int argc_, const char **argv_) {
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