Update clang drivers

llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
This commit is contained in:
Jakub Konka
2020-12-16 10:40:56 +01:00
parent 9c2d8056ce
commit 83ff94406e
2 changed files with 21 additions and 15 deletions

View File

@@ -528,6 +528,13 @@ int ZigClang_main(int argc_, const char **argv_) {
IsCrash = CommandRes < 0 || CommandRes == 70;
#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);