diff options
author | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2022-02-08 21:08:59 +0300 |
---|---|---|
committer | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2022-02-15 18:39:41 +0300 |
commit | 05337a756c6606fdbf2c0ff3a8399da3e60f1591 (patch) | |
tree | 9cacd84bdfbd5d6fe9890d558cc5e7c2b7564c3f /libcxxabi/src/cxa_guard_impl.h | |
parent | db33373596ac25f177d494aca4f46cc69c003d7d (diff) |
[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
Diffstat (limited to 'libcxxabi/src/cxa_guard_impl.h')
-rw-r--r-- | libcxxabi/src/cxa_guard_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h index 5a7cbfd5cdb9..72940cc7e869 100644 --- a/libcxxabi/src/cxa_guard_impl.h +++ b/libcxxabi/src/cxa_guard_impl.h @@ -619,7 +619,7 @@ struct GlobalStatic { static T instance; }; template <class T> -_LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {}; +_LIBCPP_CONSTINIT T GlobalStatic<T>::instance = {}; enum class Implementation { NoThreads, GlobalMutex, Futex }; |