diff options
Diffstat (limited to 'contrib/llvm-project/clang/tools/driver/driver.cpp')
-rw-r--r-- | contrib/llvm-project/clang/tools/driver/driver.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/tools/driver/driver.cpp b/contrib/llvm-project/clang/tools/driver/driver.cpp index f24fd61e61a5..f67af6790fff 100644 --- a/contrib/llvm-project/clang/tools/driver/driver.cpp +++ b/contrib/llvm-project/clang/tools/driver/driver.cpp @@ -532,6 +532,13 @@ int main(int argc_, const char **argv_) { #ifdef _WIN32 IsCrash |= CommandRes == 3; #endif +#if LLVM_ON_UNIX + // When running in integrated-cc1 mode, the CrashRecoveryContext returns + // the same codes as if the program crashed. See section "Exit Status for + // Commands": + // https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html + IsCrash |= CommandRes > 128; +#endif if (IsCrash) { TheDriver.generateCompilationDiagnostics(*C, *FailingCommand); break; |