[libcxx-commits] [libcxxabi] d9346f5 - [libc++abi] Mark __cxa_new_handler with _LIBCPP_SAFE_STATIC
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 5 11:29:47 PDT 2021
Author: Louis Dionne
Date: 2021-10-05T14:29:32-04:00
New Revision: d9346f525595da11a5a24db3c541efcd95ac3df0
URL: https://github.com/llvm/llvm-project/commit/d9346f525595da11a5a24db3c541efcd95ac3df0
DIFF: https://github.com/llvm/llvm-project/commit/d9346f525595da11a5a24db3c541efcd95ac3df0.diff
LOG: [libc++abi] Mark __cxa_new_handler with _LIBCPP_SAFE_STATIC
For consistency with the other handlers, and because requiring constant
initialization whenever we can is a good thing.
Differential Revision: https://reviews.llvm.org/D110866
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 c521c1f97713f..e9ad65724831c 100644
--- a/libcxxabi/src/cxa_default_handlers.cpp
+++ b/libcxxabi/src/cxa_default_handlers.cpp
@@ -105,7 +105,8 @@ _LIBCPP_SAFE_STATIC std::terminate_handler __cxa_terminate_handler = default_ter
_LIBCXXABI_DATA_VIS
_LIBCPP_SAFE_STATIC std::unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
-std::new_handler __cxa_new_handler = 0;
+_LIBCXXABI_DATA_VIS
+_LIBCPP_SAFE_STATIC std::new_handler __cxa_new_handler = 0;
namespace std
{
More information about the libcxx-commits
mailing list