Assertion failures call abort(), which return an exit code of 3 on
Windows. The 'not' utility has the same check.
Unfortunately, the crash-report.c test requires a shell, so it does not
run for me locally, so I can only test this manually.
There's still more work to be done here: we should generate a batch
script instead of a shell script on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212481
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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;
}