mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +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
|
#endif
|
||||||
|
|
||||||
#if defined(Q_CC_CLANG)
|
#if defined(Q_CC_CLANG)
|
||||||
#if __has_builtin(__builtin_debugger)
|
#if __has_builtin(__builtin_debugtrap)
|
||||||
#define BLACK_HAS_BUILTIN_DEBUGGER
|
#define BLACK_BUILTIN_DEBUGTRAP __builtin_debugtrap
|
||||||
|
#elif __has_builtin(__builtin_debugger)
|
||||||
|
#define BLACK_BUILTIN_DEBUGTRAP __builtin_debugger
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -47,8 +49,8 @@ namespace BlackMisc
|
|||||||
__debugbreak();
|
__debugbreak();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
# elif defined(BLACK_HAS_BUILTIN_DEBUGGER)
|
# elif defined(BLACK_BUILTIN_DEBUGTRAP)
|
||||||
__builtin_debugger();
|
BLACK_BUILTIN_DEBUGTRAP();
|
||||||
# elif defined(Q_PROCESSOR_X86)
|
# elif defined(Q_PROCESSOR_X86)
|
||||||
__asm__ volatile("int $0x03");
|
__asm__ volatile("int $0x03");
|
||||||
# elif defined(Q_PROCESSOR_ARM)
|
# elif defined(Q_PROCESSOR_ARM)
|
||||||
|
|||||||
Reference in New Issue
Block a user