[libc++] Rename *SAFE_STATIC to *CONSTINIT, and normalize its uses.
In src/, most files can use `constinit` directly because they're always
compiled with C++20. But some files, like "libcxxabi/src/fallback_malloc.cpp",
can't, because they're `#include`d directly from test cases in libcxxabi/test/
and therefore must (currently) compile as C++03. We might consider refactoring
those offending tests, or at least marking them `UNSUPPORTED: c++03`.
Differential Revision: https://reviews.llvm.org/D119264
NOKEYCHECK=True
GitOrigin-RevId: 05337a756c6606fdbf2c0ff3a8399da3e60f1591
diff --git a/src/debug.cpp b/src/debug.cpp
index ae31c91..15d8fdb 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -35,8 +35,7 @@
std::abort();
}
-_LIBCPP_SAFE_STATIC __libcpp_debug_function_type
- __libcpp_debug_function = __libcpp_abort_debug_function;
+constinit __libcpp_debug_function_type __libcpp_debug_function = __libcpp_abort_debug_function;
bool __libcpp_set_debug_function(__libcpp_debug_function_type __func) {
__libcpp_debug_function = __func;