[libc++] Remove _LIBCPP_CONSTINIT (#171802) `_LIBCPP_CONSTINIT` is only ever used inside `src/`, so we can just replace it with `constinit` instead. NOKEYCHECK=True GitOrigin-RevId: 67cf9b8f827e816ada6dbbee3a4f0cdb7c1d0595
diff --git a/src/cxa_guard_impl.h b/src/cxa_guard_impl.h index 191a589..5f51e81 100644 --- a/src/cxa_guard_impl.h +++ b/src/cxa_guard_impl.h
@@ -637,7 +637,7 @@ static T instance; }; template <class T> -_LIBCPP_CONSTINIT T GlobalStatic<T>::instance = {}; +constinit T GlobalStatic<T>::instance = {}; enum class Implementation { NoThreads, GlobalMutex, Futex };
diff --git a/src/fallback_malloc.cpp b/src/fallback_malloc.cpp index 6a261e6..81195c9 100644 --- a/src/fallback_malloc.cpp +++ b/src/fallback_malloc.cpp
@@ -35,9 +35,9 @@ // When POSIX threads are not available, make the mutex operations a nop #ifndef _LIBCXXABI_HAS_NO_THREADS -static _LIBCPP_CONSTINIT std::__libcpp_mutex_t heap_mutex = _LIBCPP_MUTEX_INITIALIZER; +static constinit std::__libcpp_mutex_t heap_mutex = _LIBCPP_MUTEX_INITIALIZER; #else -static _LIBCPP_CONSTINIT void* heap_mutex = 0; +static constinit void* heap_mutex = 0; #endif class mutexor {
diff --git a/test/guard_test_basic.pass.cpp b/test/guard_test_basic.pass.cpp index dca906a..feb9e1c 100644 --- a/test/guard_test_basic.pass.cpp +++ b/test/guard_test_basic.pass.cpp
@@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: c++03 +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 // Necessary because we include a private header of libc++abi, which // only understands _LIBCXXABI_HAS_NO_THREADS.
diff --git a/test/guard_threaded_test.pass.cpp b/test/guard_threaded_test.pass.cpp index 78dafba..d898e60 100644 --- a/test/guard_threaded_test.pass.cpp +++ b/test/guard_threaded_test.pass.cpp
@@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++03 +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 // UNSUPPORTED: no-threads // UNSUPPORTED: no-exceptions
diff --git a/test/test_fallback_malloc.pass.cpp b/test/test_fallback_malloc.pass.cpp index c8a6a07..379fe57 100644 --- a/test/test_fallback_malloc.pass.cpp +++ b/test/test_fallback_malloc.pass.cpp
@@ -13,7 +13,7 @@ #include <__thread/support.h> -// UNSUPPORTED: c++03 +// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 // UNSUPPORTED: modules-build && no-threads // Necessary because we include a private source file of libc++abi, which