[libcxx-commits] [libcxx] [libc++] Make libc++ forward-compatible with AppleClang's definition of __builtin_verbose_trap (PR #99529)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 20 03:54:56 PDT 2024


================
@@ -24,7 +24,13 @@
 #else
 
 #  if __has_builtin(__builtin_verbose_trap)
-#    define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message)
+// AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream
+// version before upstream Clang actually got the builtin.
+#    if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000
----------------
mordante wrote:

Does this mean AppleClang 17 will behave like upstream? If so let's add a TODO to remove this code once we AppleClang 16 will no longer be supported.

https://github.com/llvm/llvm-project/pull/99529


More information about the libcxx-commits mailing list