diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2022-07-25 13:43:47 -0400 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2022-07-29 13:52:42 -0400 |
commit | 507125af3d0b953cb56bce2e5b8000249fe1ef53 (patch) | |
tree | 3ada8fc1810117c180085d05c51e6b47e090ad44 /libcxx/src | |
parent | 4191d661c74622c6fa72c1643e4567f45e6c9e1b (diff) | |
download | llvm-507125af3d0b953cb56bce2e5b8000249fe1ef53.tar.gz |
[libc++] Rename __libcpp_assertion_handler to __libcpp_verbose_abort
With the goal of reusing that handler to do other things besides
handling assertions (such as terminating when an exception is thrown
under -fno-exceptions), the name `__libcpp_assertion_handler` doesn't
really make sense anymore.
Furthermore, I didn't want to use the name `__libcpp_abort_handler`,
since that would give the impression that the handler is called
whenever `std::abort()` is called, which is not the case at all.
Differential Revision: https://reviews.llvm.org/D130562
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libcxx/src/verbose_abort.cpp (renamed from libcxx/src/assert.cpp) | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index f7d2896d10f3..61c60f934599 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -4,7 +4,6 @@ set(LIBCXX_LIB_CMAKEFILES_DIR "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTOR set(LIBCXX_SOURCES algorithm.cpp any.cpp - assert.cpp atomic.cpp barrier.cpp bind.cpp @@ -62,6 +61,7 @@ set(LIBCXX_SOURCES valarray.cpp variant.cpp vector.cpp + verbose_abort.cpp ) if (LIBCXX_ENABLE_DEBUG_MODE OR LIBCXX_ENABLE_BACKWARDS_COMPATIBILITY_DEBUG_MODE_SYMBOLS) diff --git a/libcxx/src/assert.cpp b/libcxx/src/verbose_abort.cpp index d6e96f255e35..a9fba5e3c007 100644 --- a/libcxx/src/assert.cpp +++ b/libcxx/src/verbose_abort.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include <__assert> #include <__config> +#include <__verbose_abort> #include <cstdarg> #include <cstdio> #include <cstdlib> @@ -29,7 +29,7 @@ extern "C" void android_set_abort_message(const char* msg); _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_WEAK -void __libcpp_assertion_handler(char const* format, ...) { +void __libcpp_verbose_abort(char const* format, ...) { // Write message to stderr. We do this before formatting into a // buffer so that we still get some information out if that fails. { |