diff options
Diffstat (limited to 'clang/tools/driver')
| -rw-r--r-- | clang/tools/driver/driver.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index 8993a092e07..9f93837c2c7 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/tools/driver/driver.cpp @@ -433,8 +433,13 @@ int main(int argc_, const char **argv_) { // If result status is < 0, then the driver command signalled an error. // If result status is 70, then the driver command reported a fatal error. - // In these cases, generate additional diagnostic information if possible. - if (CommandRes < 0 || CommandRes == 70) { + // On Windows, abort will return an exit code of 3. In these cases, + // generate additional diagnostic information if possible. + bool DiagnoseCrash = CommandRes < 0 || CommandRes == 70; +#ifdef LLVM_ON_WIN32 + DiagnoseCrash |= CommandRes == 3; +#endif + if (DiagnoseCrash) { TheDriver.generateCompilationDiagnostics(*C, FailingCommand); break; } |

