aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsomov <somov@yandex-team.com>2022-10-30 12:12:32 +0300
committersomov <somov@yandex-team.com>2022-10-30 12:12:32 +0300
commit4797d8678612824c0533a78b241eb6611131d542 (patch)
treed342a745125e6a1443906e2f7dfa0e7f8e4f44f8
parent9d1d72f5a7fd1f6f3649918ce82af1fb42d2d8be (diff)
downloadydb-4797d8678612824c0533a78b241eb6611131d542.tar.gz
Correct debug trap for M1
-rw-r--r--util/system/yassert.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/system/yassert.h b/util/system/yassert.h
index 529823440c..c6c8b8349b 100644
--- a/util/system/yassert.h
+++ b/util/system/yassert.h
@@ -25,6 +25,10 @@
#if !defined(_MSC_VER)
#if defined(__has_builtin) && __has_builtin(__debugbreak)
// Do nothing, use __debugbreak builtin
+ #elif defined(__has_builtin) && __has_builtin(__builtin_debugtrap)
+inline void __debugbreak() {
+ __builtin_debugtrap();
+}
#else
inline void __debugbreak() {
#if defined(__x86_64__) || defined(__i386__)