[libc++] Fix AppleClang version number when checking for __builtin_verbose_trap suppo...
authorLouis Dionne <ldionne.2@gmail.com>
Fri, 27 Sep 2024 12:53:02 +0000 (08:53 -0400)
committerTobias Hieta <tobias@hieta.se>
Tue, 1 Oct 2024 06:56:18 +0000 (08:56 +0200)
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

index 3b6d6b2cca53c2ed258c239ec18c3b77c9dcf997..e12ccccdaff37fcc8699a980a3633cc7a8d143c2 100644 (file)
@@ -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)