From 5d2f8c31556b6a5ce29d2cad314bc48af879c5b3 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 29 Nov 2011 07:47:04 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145389 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Windows/Signals.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Support/Windows/Signals.inc') diff --git a/lib/Support/Windows/Signals.inc b/lib/Support/Windows/Signals.inc index 0d4b8a2..3a7e90b 100644 --- a/lib/Support/Windows/Signals.inc +++ b/lib/Support/Windows/Signals.inc @@ -446,7 +446,7 @@ static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep) { } if (ExitOnUnhandledExceptions) - _exit(-3); + _exit(ep->ExceptionRecord->ExceptionCode); // Allow dialog box to pop up allowing choice to start debugger. if (OldFilter) -- cgit v1.1