[llvm-branch-commits] [libcxx] [libc++] Fix AppleClang version number when checking for __builtin_verbose_trap support (PR #110263)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 27 06:05:06 PDT 2024


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/110263

We should have been checking against 1700, not 17000, which was a typo.

(cherry picked from commit 1eba87904b0cbaaee82cfdb835528b85d99320ef)

>From b1affedd7d2e4f2e13c3a2cbd8e3645fb5b9af0e Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 27 Sep 2024 08:53:02 -0400
Subject: [PATCH] [libc++] Fix AppleClang version number when checking for
 __builtin_verbose_trap support (#110161)

We should have been checking against 1700, not 17000, which was a typo.

(cherry picked from commit 1eba87904b0cbaaee82cfdb835528b85d99320ef)
---
 libcxx/vendor/llvm/default_assertion_handler.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libcxx/vendor/llvm/default_assertion_handler.in b/libcxx/vendor/llvm/default_assertion_handler.in
index 3b6d6b2cca53c2..e12ccccdaff37f 100644
--- a/libcxx/vendor/llvm/default_assertion_handler.in
+++ b/libcxx/vendor/llvm/default_assertion_handler.in
@@ -26,7 +26,8 @@
 #  if __has_builtin(__builtin_verbose_trap)
 // 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
+// TODO: Remove once AppleClang supports the two-arguments version of the builtin.
+#    if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700
 #      define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message)
 #    else
 #      define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message)



More information about the llvm-branch-commits mailing list