[llvm] r228738 - Changing the status code generated by LLVM_BUILTIN_TRAP on Windows to be something categorized as a valid error code. Fixes crashing uses (such as not --crash) with existing sys::Wait behavior.

Aaron Ballman aaron at aaronballman.com
Tue Feb 10 12:13:52 PST 2015


Author: aaronballman
Date: Tue Feb 10 14:13:52 2015
New Revision: 228738

URL: http://llvm.org/viewvc/llvm-project?rev=228738&view=rev
Log:
Changing the status code generated by LLVM_BUILTIN_TRAP on Windows to be something categorized as a valid error code. Fixes crashing uses (such as not --crash) with existing sys::Wait behavior.

Modified:
    llvm/trunk/include/llvm/Support/Compiler.h

Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=228738&r1=228737&r2=228738&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Tue Feb 10 14:13:52 2015
@@ -297,7 +297,7 @@ extern "C" __declspec(dllimport) void __
 #endif
 # define LLVM_BUILTIN_TRAP                                                     \
   do {                                                                         \
-    ::RaiseException(0xDEADD0D0, 0x1 /*EXCEPTION_NONCONTINUABLE*/, 0, nullptr);\
+    ::RaiseException(0x8000DEAD, 0x1 /*EXCEPTION_NONCONTINUABLE*/, 0, nullptr);\
     __assume(false);                                                           \
   } while (0)
 #else





More information about the llvm-commits mailing list