Skip to content

Commit 85a847f

Browse files
authored
[libc++] Simplify features for detecting atomics' support. (#75553)
`non-lockfree-atomics` is very similar to `has-64-bit-atomics`; to simplify, we can have uniform features for atomic types of increasing sizes (`has-128-bit-atomics`, `has-256-bit-atomics`, etc.). `is-lockfree-runtime-function` feature was a workaround for the partial support for large atomic types on older versions of macOS (see https://reviews.llvm.org/D91911). While we still support macOS 10.14, conceptually it's simpler to check for support for all the atomic functionality inside the `has-*-atomics` features, and the workaround is no longer worth the maintenance cost.
1 parent 626fe71 commit 85a847f

36 files changed

+25
-58
lines changed

libcxx/test/libcxx/atomics/atomics.align/align.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// UNSUPPORTED: c++03
10-
// REQUIRES: is-lockfree-runtime-function
10+
// REQUIRES: has-128-bit-atomics
1111
// ADDITIONAL_COMPILE_FLAGS: -Wno-psabi
1212
// ... since C++20 std::__atomic_base initializes, so we get a warning about an
1313
// ABI change for vector variants since the constructor code for that is

libcxx/test/libcxx/atomics/atomics.types.generic/atomics.types.float/lockfree.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// static constexpr bool is_always_lock_free = implementation-defined;
1312
// bool is_lock_free() const volatile noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/assign.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// floating-point-type operator=(floating-point-type) volatile noexcept;
1312
// floating-point-type operator=(floating-point-type) noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_strong.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// bool compare_exchange_strong(T& expected, T desired,
1312
// memory_order success, memory_order failure) volatile noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/compare_exchange_weak.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// bool compare_exchange_weak(T& expected, T desired,
1312
// memory_order success, memory_order failure) volatile noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/ctor.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// constexpr atomic() noexcept;
1312
// constexpr atomic(floating-point-type) noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/exchange.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// T exchange(T, memory_order = memory_order::seq_cst) volatile noexcept;
1312
// T exchange(T, memory_order = memory_order::seq_cst) noexcept;

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_add.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// UNSUPPORTED: LIBCXX-AIX-FIXME
1010
// XFAIL: !has-64-bit-atomics
11-
// UNSUPPORTED: !non-lockfree-atomics
1211

1312
// https://github.com/llvm/llvm-project/issues/72893
1413
// XFAIL: target={{x86_64-.*}} && tsan

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_sub.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// UNSUPPORTED: LIBCXX-AIX-FIXME
1010
// XFAIL: !has-64-bit-atomics
11-
// UNSUPPORTED: !non-lockfree-atomics
1211

1312
// https://github.com/llvm/llvm-project/issues/72893
1413
// XFAIL: target={{x86_64-.*}} && tsan

libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// XFAIL: !has-64-bit-atomics
10-
// UNSUPPORTED: !non-lockfree-atomics
1110

1211
// floating-point-type load(memory_order = memory_order::seq_cst) volatile noexcept;
1312
// floating-point-type load(memory_order = memory_order::seq_cst) noexcept;

0 commit comments

Comments
 (0)