[cfe-commits] r145389 - /cfe/trunk/lib/Driver/Driver.cpp
Chad Rosier
mcrosier at apple.com
Tue Nov 29 10:13:29 PST 2011
Hi,
Does this prevent the diagnostic information from being generated (e.g., preprocessed source, etc.)?
See the tail end of main() in driver.cpp:
if (C.get())
Res = TheDriver.ExecuteCompilation(*C, FailingCommand);
// If result status is < 0, then the driver command signalled an error.
// In this case, generate additional diagnostic information if possible.
if (Res < 0)
TheDriver.generateCompilationDiagnostics(*C, FailingCommand);
Chad
On Nov 28, 2011, at 11:47 PM, NAKAMURA Takumi wrote:
> Author: chapuni
> Date: Tue Nov 29 01:47:04 2011
> New Revision: 145389
>
> URL: http://llvm.org/viewvc/llvm-project?rev=145389&view=rev
> Log:
> [Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver.
>
> clang/lib/Driver/Driver.cpp: Don't pass through negative exit status, or parent would be confused.
>
> llvm::sys::Program::Wait(): Suppose 0x8000XXXX and 0xC000XXXX as abnormal exit code and pass it as negative value.
>
> Win32 Exception Handler: Exit with ExceptionCode on an unhandle exception.
>
> Modified:
> cfe/trunk/lib/Driver/Driver.cpp
>
> Modified: cfe/trunk/lib/Driver/Driver.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=145389&r1=145388&r2=145389&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Driver.cpp (original)
> +++ cfe/trunk/lib/Driver/Driver.cpp Tue Nov 29 01:47:04 2011
> @@ -511,8 +511,14 @@
> 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.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list