[libcxx-commits] [libcxx] [libcxx] mark _LIBCPP_VERBOSE_{ABORT, TRAP} `nomerge` (PR #200078)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 29 06:15:53 PDT 2026


================
@@ -42,9 +42,13 @@ _LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
 #  if !_LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT
 // The decltype is there to suppress -Wunused warnings in this configuration.
 void __use(const char*, ...);
-#    define _LIBCPP_VERBOSE_ABORT(...) (decltype(::std::__use(__VA_ARGS__))(), __builtin_abort())
+#    define _LIBCPP_VERBOSE_ABORT(...)                                                                                 \
+      ({                                                                                                               \
+        decltype(::std::__use(__VA_ARGS__))();                                                                         \
+        [[clang::__nomerge__]] __builtin_abort();                                                                      \
+      })
 #  else
-#    define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__)
+#    define _LIBCPP_VERBOSE_ABORT(...) ({ [[clang::__nomerge__]] ::std::__libcpp_verbose_abort(__VA_ARGS__); })
----------------
philnik777 wrote:

I'm much less certain about this one, since we don't really use that much debuggability while potentially generating significantly more code.

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


More information about the libcxx-commits mailing list