[libcxx-commits] [PATCH] D140946: [libcxx] Fix build with GLIBC

Vitaly Buka via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 3 19:55:58 PST 2023


vitalybuka updated this revision to Diff 486152.
vitalybuka added a comment.

__builtin_abort


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140946/new/

https://reviews.llvm.org/D140946

Files:
  libcxx/include/__verbose_abort


Index: libcxx/include/__verbose_abort
===================================================================
--- libcxx/include/__verbose_abort
+++ libcxx/include/__verbose_abort
@@ -25,14 +25,11 @@
 // dependency-free (this is included everywhere else in the library).
 #if defined(_LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY) && !defined(_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED)
 
-extern "C" void abort();
-
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 _LIBCPP_NORETURN _LIBCPP_ALWAYS_INLINE _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) _LIBCPP_HIDE_FROM_ABI inline
 void __libcpp_verbose_abort(const char *, ...) {
-  ::abort();
-  __builtin_unreachable(); // never reached, but needed to tell the compiler that the function never returns
+  __builtin_abort();
 }
 
 _LIBCPP_END_NAMESPACE_STD


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140946.486152.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230104/bc5bdafb/attachment-0001.bin>


More information about the libcxx-commits mailing list