File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 19
19
20
20
#include < llvm/Support/Compiler.h>
21
21
#include < stdint.h>
22
+ #include " swift/Basic/Unreachable.h"
22
23
#include " swift/Runtime/Config.h"
23
24
#include " swift/Runtime/Metadata.h"
24
25
@@ -70,13 +71,9 @@ LLVM_ATTRIBUTE_NORETURN
70
71
LLVM_ATTRIBUTE_ALWAYS_INLINE // Minimize trashed registers
71
72
static inline void crash (const char *message) {
72
73
CRSetCrashLogMessage (message);
73
- // __builtin_trap() doesn't always do the right thing due to GCC compatibility
74
- #if defined(__i386__) || defined(__x86_64__)
75
- asm (" int3" );
76
- #else
77
- __builtin_trap ();
78
- #endif
79
- __builtin_unreachable ();
74
+
75
+ LLVM_BUILTIN_TRAP;
76
+ swift_unreachable (" Expected compiler to crash." );
80
77
}
81
78
82
79
// / Report a corrupted type object.
You can’t perform that action at this time.
0 commit comments