File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 18
18
#include " include/atomic_support.h"
19
19
20
20
#if !defined(LIBCXXABI_SILENT_TERMINATE)
21
+
22
+ _LIBCPP_SAFE_STATIC
21
23
static const char * cause = " uncaught" ;
22
24
23
25
__attribute__ ((noreturn))
@@ -82,21 +84,21 @@ static void demangling_unexpected_handler()
82
84
std::terminate ();
83
85
}
84
86
85
- static std::terminate_handler default_terminate_handler = demangling_terminate_handler;
86
- static std::terminate_handler default_unexpected_handler = demangling_unexpected_handler;
87
+ static constexpr std::terminate_handler default_terminate_handler = demangling_terminate_handler;
88
+ static constexpr std::terminate_handler default_unexpected_handler = demangling_unexpected_handler;
87
89
#else
88
- static std::terminate_handler default_terminate_handler = ::abort;
89
- static std::terminate_handler default_unexpected_handler = std::terminate;
90
+ static constexpr std::terminate_handler default_terminate_handler = ::abort;
91
+ static constexpr std::terminate_handler default_unexpected_handler = std::terminate;
90
92
#endif
91
93
92
94
//
93
95
// Global variables that hold the pointers to the current handler
94
96
//
95
97
_LIBCXXABI_DATA_VIS
96
- std::terminate_handler __cxa_terminate_handler = default_terminate_handler;
98
+ _LIBCPP_SAFE_STATIC std::terminate_handler __cxa_terminate_handler = default_terminate_handler;
97
99
98
100
_LIBCXXABI_DATA_VIS
99
- std::unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
101
+ _LIBCPP_SAFE_STATIC std::unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
100
102
101
103
namespace std
102
104
{
You can’t perform that action at this time.
0 commit comments