diff options
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; } |