Skip to content

Commit d9346f5

Browse files
committed
[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
1 parent 7a89444 commit d9346f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxxabi/src/cxa_default_handlers.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ _LIBCPP_SAFE_STATIC std::terminate_handler __cxa_terminate_handler = default_ter
105105
_LIBCXXABI_DATA_VIS
106106
_LIBCPP_SAFE_STATIC std::unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
107107

108-
std::new_handler __cxa_new_handler = 0;
108+
_LIBCXXABI_DATA_VIS
109+
_LIBCPP_SAFE_STATIC std::new_handler __cxa_new_handler = 0;
109110

110111
namespace std
111112
{

0 commit comments

Comments
 (0)