mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Improve handling of BLACK_VERIFY on different Clang versions.
This commit is contained in:
committed by
Klaus Basan
parent
a93e7982b5
commit
6d1f0328bf
@@ -21,8 +21,10 @@
|
||||
#endif
|
||||
|
||||
#if defined(Q_CC_CLANG)
|
||||
#if __has_builtin(__builtin_debugger)
|
||||
#define BLACK_HAS_BUILTIN_DEBUGGER
|
||||
#if __has_builtin(__builtin_debugtrap)
|
||||
#define BLACK_BUILTIN_DEBUGTRAP __builtin_debugtrap
|
||||
#elif __has_builtin(__builtin_debugger)
|
||||
#define BLACK_BUILTIN_DEBUGTRAP __builtin_debugger
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -47,8 +49,8 @@ namespace BlackMisc
|
||||
__debugbreak();
|
||||
return;
|
||||
}
|
||||
# elif defined(BLACK_HAS_BUILTIN_DEBUGGER)
|
||||
__builtin_debugger();
|
||||
# elif defined(BLACK_BUILTIN_DEBUGTRAP)
|
||||
BLACK_BUILTIN_DEBUGTRAP();
|
||||
# elif defined(Q_PROCESSOR_X86)
|
||||
__asm__ volatile("int $0x03");
|
||||
# elif defined(Q_PROCESSOR_ARM)
|
||||
|
||||
Reference in New Issue
Block a user