[libcxx-commits] [libcxx] d19fbfe - [libcxx] Fix build with GLIBC

Vitaly Buka via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 3 23:56:07 PST 2023


Author: Vitaly Buka
Date: 2023-01-03T23:55:55-08:00
New Revision: d19fbfed47d9efc5d7ae9502a5273ca0a5397d95

URL: https://github.com/llvm/llvm-project/commit/d19fbfed47d9efc5d7ae9502a5273ca0a5397d95
DIFF: https://github.com/llvm/llvm-project/commit/d19fbfed47d9efc5d7ae9502a5273ca0a5397d95.diff

LOG: [libcxx] Fix build with GLIBC

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D140946

Added: 
    

Modified: 
    libcxx/include/__verbose_abort

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort
index fddef4900e256..3559c5231c312 100644
--- a/libcxx/include/__verbose_abort
+++ b/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_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


        


More information about the libcxx-commits mailing list