diff options
author | Nikolas Klauser <n_klauser@apple.com> | 2023-05-11 20:24:30 -0700 |
---|---|---|
committer | Nikolas Klauser <n_klauser@apple.com> | 2023-05-13 16:27:03 -0700 |
commit | c04bcadf30ee07d437a238f78c2fb2c90be5c40c (patch) | |
tree | 4a418ff0857611918d076b736f247271d2e492b2 /libcxx | |
parent | bd1170d2c371283447555bda6057f10e4cb0d25a (diff) | |
download | llvm-c04bcadf30ee07d437a238f78c2fb2c90be5c40c.tar.gz |
[libc++][NFC] Use _LIBCPP_STD_VER instead of __cpp_lib_atomic_is_always_lock_free
Reviewed By: #libc, ldionne, Mordante
Spies: Mordante, libcxx-commits
Differential Revision: https://reviews.llvm.org/D150421
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/__atomic/aliases.h | 2 | ||||
-rw-r--r-- | libcxx/include/__atomic/atomic_base.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/__atomic/aliases.h b/libcxx/include/__atomic/aliases.h index 806589b630ee..e2f9fae4094e 100644 --- a/libcxx/include/__atomic/aliases.h +++ b/libcxx/include/__atomic/aliases.h @@ -82,7 +82,7 @@ using atomic_uintmax_t = atomic<uintmax_t>; // atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type -#ifdef __cpp_lib_atomic_is_always_lock_free +#if _LIBCPP_STD_VER >= 17 # define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value #else # define _LIBCPP_CONTENTION_LOCK_FREE false diff --git a/libcxx/include/__atomic/atomic_base.h b/libcxx/include/__atomic/atomic_base.h index 7a9ba7843319..87100ba5d8a5 100644 --- a/libcxx/include/__atomic/atomic_base.h +++ b/libcxx/include/__atomic/atomic_base.h @@ -33,7 +33,7 @@ struct __atomic_base // false { mutable __cxx_atomic_impl<_Tp> __a_; -#if defined(__cpp_lib_atomic_is_always_lock_free) +#if _LIBCPP_STD_VER >= 17 static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value; #endif @@ -139,7 +139,7 @@ struct __atomic_base // false __atomic_base(const __atomic_base&) = delete; }; -#if defined(__cpp_lib_atomic_is_always_lock_free) +#if _LIBCPP_STD_VER >= 17 template <class _Tp, bool __b> _LIBCPP_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free; #endif |