forked from OSchip/llvm-project
[Win32] Rework crash-report since r145389.
- lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
This commit is contained in:
parent
78c0295fcf
commit
ed5bbe9020
|
@ -582,14 +582,8 @@ int Driver::ExecuteCompilation(const Compilation &C,
|
|||
C.CleanupFileList(C.getResultFiles(), true);
|
||||
|
||||
// Failure result files are valid unless we crashed.
|
||||
if (Res < 0) {
|
||||
if (Res < 0)
|
||||
C.CleanupFileList(C.getFailureResultFiles(), true);
|
||||
#ifdef _WIN32
|
||||
// Exit status should not be negative on Win32,
|
||||
// unless abnormal termination.
|
||||
Res = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// Print extra information about abnormal failures, if possible.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
|
||||
// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
|
||||
// REQUIRES: crash-recovery
|
||||
// XFAIL: mingw32,win32
|
||||
// REQUIRES: shell
|
||||
|
||||
#pragma clang __debug parser_crash
|
||||
// CHECK: Preprocessed source(s) and associated run script(s) are located at:
|
||||
|
|
|
@ -490,5 +490,13 @@ int main(int argc_, const char **argv_) {
|
|||
|
||||
llvm::llvm_shutdown();
|
||||
|
||||
#ifdef _WIN32
|
||||
// Exit status should not be negative on Win32, unless abnormal termination.
|
||||
// Once abnormal termiation was caught, negative status should not be
|
||||
// propagated.
|
||||
if (Res < 0)
|
||||
Res = 1;
|
||||
#endif
|
||||
|
||||
return Res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue