diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-07-17 05:09:29 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-07-17 05:09:29 +0000 |
commit | df9b933aa354b8108cee028cc4726cfa9f2df62c (patch) | |
tree | 002c57be26f370e2fcd1f05b933637d46d0e4c64 /tools/driver/driver.cpp | |
parent | e5756792d2303f500381204845cee5b6990dcaec (diff) | |
download | clang-df9b933aa354b8108cee028cc4726cfa9f2df62c.tar.gz clang-df9b933aa354b8108cee028cc4726cfa9f2df62c.tar.bz2 clang-df9b933aa354b8108cee028cc4726cfa9f2df62c.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver/driver.cpp')
-rw-r--r-- | tools/driver/driver.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 7813f355e4..12a93298c0 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -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; } |