[libcxx-commits] [libcxxabi] 75dd411 - [libc++abi] Add a missing include for abort() (#126865)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 12 05:18:05 PST 2025
Author: Takuto Ikuta
Date: 2025-02-12T14:18:02+01:00
New Revision: 75dd4119b2798a53241089f77922a2e13ead6b94
URL: https://github.com/llvm/llvm-project/commit/75dd4119b2798a53241089f77922a2e13ead6b94
DIFF: https://github.com/llvm/llvm-project/commit/75dd4119b2798a53241089f77922a2e13ead6b94.diff
LOG: [libc++abi] Add a missing include for abort() (#126865)
This is to fix a build error when we use Clang modules in Chromium.
Added:
Modified:
libcxxabi/src/cxa_default_handlers.cpp
Removed:
################################################################################
diff --git a/libcxxabi/src/cxa_default_handlers.cpp b/libcxxabi/src/cxa_default_handlers.cpp
index b029982ea87c3..97a6765fde8e9 100644
--- a/libcxxabi/src/cxa_default_handlers.cpp
+++ b/libcxxabi/src/cxa_default_handlers.cpp
@@ -9,6 +9,7 @@
// new_handler.
//===----------------------------------------------------------------------===//
+#include <cstdlib> // std::abort
#include <exception>
#include <new>
#include "abort_message.h"
@@ -94,7 +95,7 @@ static void demangling_unexpected_handler()
static constexpr std::terminate_handler default_terminate_handler = demangling_terminate_handler;
static constexpr std::terminate_handler default_unexpected_handler = demangling_unexpected_handler;
#else // !LIBCXXABI_SILENT_TERMINATE
-static constexpr std::terminate_handler default_terminate_handler = ::abort;
+static constexpr std::terminate_handler default_terminate_handler = std::abort;
static constexpr std::terminate_handler default_unexpected_handler = std::terminate;
#endif // !LIBCXXABI_SILENT_TERMINATE
More information about the libcxx-commits
mailing list