[cfe-commits] r160343 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/crash-report.c tools/driver/driver.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Mon Jul 16 22:09:29 PDT 2012
Author: chapuni
Date: Tue Jul 17 00:09:29 2012
New Revision: 160343
URL: http://llvm.org/viewvc/llvm-project?rev=160343&view=rev
Log:
[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.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/crash-report.c
cfe/trunk/tools/driver/driver.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=160343&r1=160342&r2=160343&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Jul 17 00:09:29 2012
@@ -582,14 +582,8 @@
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.
Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=160343&r1=160342&r2=160343&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Tue Jul 17 00:09:29 2012
@@ -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:
Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=160343&r1=160342&r2=160343&view=diff
==============================================================================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Tue Jul 17 00:09:29 2012
@@ -490,5 +490,13 @@
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;
}
More information about the cfe-commits
mailing list