Skip to content

Commit 895e066

Browse files
committed
[libc++] Remove availability annotations that aren't required anymore
1 parent 4b05a12 commit 895e066

File tree

290 files changed

+216
-824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+216
-824
lines changed

libcxx/include/__atomic/atomic.h

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,16 @@ struct __atomic_base // false
114114
}
115115

116116
#if _LIBCPP_STD_VER >= 20
117-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const
118-
volatile _NOEXCEPT {
117+
_LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT {
119118
std::__atomic_wait(*this, __v, __m);
120119
}
121-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
122-
wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
120+
_LIBCPP_HIDE_FROM_ABI void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
123121
std::__atomic_wait(*this, __v, __m);
124122
}
125-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT {
126-
std::__atomic_notify_one(*this);
127-
}
128-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
129-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT {
130-
std::__atomic_notify_all(*this);
131-
}
132-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
123+
_LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT { std::__atomic_notify_one(*this); }
124+
_LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
125+
_LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT { std::__atomic_notify_all(*this); }
126+
_LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
133127
#endif // _LIBCPP_STD_VER >= 20
134128

135129
#if _LIBCPP_STD_VER >= 20
@@ -619,28 +613,27 @@ _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_strong_explicit(
619613
// atomic_wait
620614

621615
template <class _Tp>
622-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
616+
_LIBCPP_HIDE_FROM_ABI void
623617
atomic_wait(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) _NOEXCEPT {
624618
return __o->wait(__v);
625619
}
626620

627621
template <class _Tp>
628-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
629-
atomic_wait(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) _NOEXCEPT {
622+
_LIBCPP_HIDE_FROM_ABI void atomic_wait(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v) _NOEXCEPT {
630623
return __o->wait(__v);
631624
}
632625

633626
// atomic_wait_explicit
634627

635628
template <class _Tp>
636-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
629+
_LIBCPP_HIDE_FROM_ABI void
637630
atomic_wait_explicit(const volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) _NOEXCEPT
638631
_LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
639632
return __o->wait(__v, __m);
640633
}
641634

642635
template <class _Tp>
643-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
636+
_LIBCPP_HIDE_FROM_ABI void
644637
atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __v, memory_order __m) _NOEXCEPT
645638
_LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) {
646639
return __o->wait(__v, __m);
@@ -649,22 +642,22 @@ atomic_wait_explicit(const atomic<_Tp>* __o, typename atomic<_Tp>::value_type __
649642
// atomic_notify_one
650643

651644
template <class _Tp>
652-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT {
645+
_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT {
653646
__o->notify_one();
654647
}
655648
template <class _Tp>
656-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT {
649+
_LIBCPP_HIDE_FROM_ABI void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT {
657650
__o->notify_one();
658651
}
659652

660653
// atomic_notify_all
661654

662655
template <class _Tp>
663-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT {
656+
_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT {
664657
__o->notify_all();
665658
}
666659
template <class _Tp>
667-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT {
660+
_LIBCPP_HIDE_FROM_ABI void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT {
668661
__o->notify_all();
669662
}
670663

libcxx/include/__atomic/atomic_flag.h

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,16 @@ struct atomic_flag {
4949
}
5050

5151
#if _LIBCPP_STD_VER >= 20
52-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const
53-
volatile _NOEXCEPT {
52+
_LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT {
5453
std::__atomic_wait(*this, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);
5554
}
56-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
57-
wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
55+
_LIBCPP_HIDE_FROM_ABI void wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT {
5856
std::__atomic_wait(*this, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);
5957
}
60-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT {
61-
std::__atomic_notify_one(*this);
62-
}
63-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
64-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT {
65-
std::__atomic_notify_all(*this);
66-
}
67-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
58+
_LIBCPP_HIDE_FROM_ABI void notify_one() volatile _NOEXCEPT { std::__atomic_notify_one(*this); }
59+
_LIBCPP_HIDE_FROM_ABI void notify_one() _NOEXCEPT { std::__atomic_notify_one(*this); }
60+
_LIBCPP_HIDE_FROM_ABI void notify_all() volatile _NOEXCEPT { std::__atomic_notify_all(*this); }
61+
_LIBCPP_HIDE_FROM_ABI void notify_all() _NOEXCEPT { std::__atomic_notify_all(*this); }
6862
#endif
6963

7064
#if _LIBCPP_STD_VER >= 20
@@ -143,43 +137,26 @@ inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_clear_explicit(atomic_flag* __o, m
143137
}
144138

145139
#if _LIBCPP_STD_VER >= 20
146-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
147-
atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT {
140+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT {
148141
__o->wait(__v);
149142
}
150143

151-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
152-
atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT {
153-
__o->wait(__v);
154-
}
144+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT { __o->wait(__v); }
155145

156-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
146+
inline _LIBCPP_HIDE_FROM_ABI void
157147
atomic_flag_wait_explicit(const volatile atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
158148
__o->wait(__v, __m);
159149
}
160150

161-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
151+
inline _LIBCPP_HIDE_FROM_ABI void
162152
atomic_flag_wait_explicit(const atomic_flag* __o, bool __v, memory_order __m) _NOEXCEPT {
163153
__o->wait(__v, __m);
164154
}
165155

166-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
167-
atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT {
168-
__o->notify_one();
169-
}
170-
171-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT {
172-
__o->notify_one();
173-
}
174-
175-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void
176-
atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT {
177-
__o->notify_all();
178-
}
179-
180-
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_SYNC void atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT {
181-
__o->notify_all();
182-
}
156+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT { __o->notify_one(); }
157+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT { __o->notify_one(); }
158+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT { __o->notify_all(); }
159+
inline _LIBCPP_HIDE_FROM_ABI void atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT { __o->notify_all(); }
183160
#endif // _LIBCPP_STD_VER >= 20
184161

185162
_LIBCPP_END_NAMESPACE_STD

libcxx/include/__atomic/atomic_sync.h

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,16 @@ struct __atomic_waitable< _Tp,
5858
#if _LIBCPP_STD_VER >= 20
5959
# if _LIBCPP_HAS_THREADS
6060

61-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
62-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
63-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
64-
__libcpp_atomic_monitor(void const volatile*) _NOEXCEPT;
65-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
66-
__libcpp_atomic_wait(void const volatile*, __cxx_contention_t) _NOEXCEPT;
67-
68-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
69-
__cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
70-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
71-
__cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
72-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
61+
_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
62+
_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
63+
_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) _NOEXCEPT;
64+
_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile*, __cxx_contention_t) _NOEXCEPT;
65+
66+
_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
67+
_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
68+
_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
7369
__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
74-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
70+
_LIBCPP_EXPORTED_FROM_ABI void
7571
__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT;
7672

7773
template <class _AtomicWaitable, class _Poll>
@@ -82,7 +78,6 @@ struct __atomic_wait_backoff_impl {
8278

8379
using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >;
8480

85-
_LIBCPP_AVAILABILITY_SYNC
8681
_LIBCPP_HIDE_FROM_ABI bool
8782
__update_monitor_val_and_poll(__cxx_atomic_contention_t const volatile*, __cxx_contention_t& __monitor_val) const {
8883
// In case the contention type happens to be __cxx_atomic_contention_t, i.e. __cxx_atomic_impl<int64_t>,
@@ -95,7 +90,6 @@ struct __atomic_wait_backoff_impl {
9590
return __poll_(__monitor_val);
9691
}
9792

98-
_LIBCPP_AVAILABILITY_SYNC
9993
_LIBCPP_HIDE_FROM_ABI bool
10094
__update_monitor_val_and_poll(void const volatile* __contention_address, __cxx_contention_t& __monitor_val) const {
10195
// In case the contention type is anything else, platform wait is monitoring a __cxx_atomic_contention_t
@@ -105,7 +99,6 @@ struct __atomic_wait_backoff_impl {
10599
return __poll_(__current_val);
106100
}
107101

108-
_LIBCPP_AVAILABILITY_SYNC
109102
_LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const {
110103
if (__elapsed > chrono::microseconds(4)) {
111104
auto __contention_address = __waitable_traits::__atomic_contention_address(__a_);
@@ -128,8 +121,7 @@ struct __atomic_wait_backoff_impl {
128121
// `false`, it must set the argument to its current understanding of the atomic
129122
// value. The predicate function must not return `false` spuriously.
130123
template <class _AtomicWaitable, class _Poll>
131-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
132-
__atomic_wait_unless(const _AtomicWaitable& __a, memory_order __order, _Poll&& __poll) {
124+
_LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, memory_order __order, _Poll&& __poll) {
133125
static_assert(__atomic_waitable<_AtomicWaitable>::value, "");
134126
__atomic_wait_backoff_impl<_AtomicWaitable, __decay_t<_Poll> > __backoff_fn = {__a, __poll, __order};
135127
std::__libcpp_thread_poll_with_backoff(
@@ -142,13 +134,13 @@ __atomic_wait_unless(const _AtomicWaitable& __a, memory_order __order, _Poll&& _
142134
}
143135

144136
template <class _AtomicWaitable>
145-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) {
137+
_LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) {
146138
static_assert(__atomic_waitable<_AtomicWaitable>::value, "");
147139
std::__cxx_atomic_notify_one(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a));
148140
}
149141

150142
template <class _AtomicWaitable>
151-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) {
143+
_LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) {
152144
static_assert(__atomic_waitable<_AtomicWaitable>::value, "");
153145
std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a));
154146
}
@@ -180,8 +172,7 @@ _LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp c
180172
}
181173

182174
template <class _AtomicWaitable, class _Tp>
183-
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void
184-
__atomic_wait(_AtomicWaitable& __a, _Tp __val, memory_order __order) {
175+
_LIBCPP_HIDE_FROM_ABI void __atomic_wait(_AtomicWaitable& __a, _Tp __val, memory_order __order) {
185176
static_assert(__atomic_waitable<_AtomicWaitable>::value, "");
186177
std::__atomic_wait_unless(__a, __order, [&](_Tp const& __current) {
187178
return !std::__cxx_nonatomic_compare_equal(__current, __val);

libcxx/include/__chrono/file_clock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct _FilesystemClock {
6060

6161
_LIBCPP_EXPORTED_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
6262

63-
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXPORTED_FROM_ABI static time_point now() noexcept;
63+
_LIBCPP_EXPORTED_FROM_ABI static time_point now() noexcept;
6464

6565
# if _LIBCPP_STD_VER >= 20
6666
template <class _Duration>

libcxx/include/__configuration/availability.h

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,6 @@
108108
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
109109
# define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
110110

111-
# define _LIBCPP_INTRODUCED_IN_LLVM_11 1
112-
# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE /* nothing */
113-
114-
# define _LIBCPP_INTRODUCED_IN_LLVM_9 1
115-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE /* nothing */
116-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
117-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
118-
119111
#elif defined(__APPLE__)
120112

121113
// clang-format off
@@ -215,48 +207,6 @@
215207
__attribute__((availability(bridgeos, strict, introduced = 6.0))) \
216208
__attribute__((availability(driverkit, strict, introduced = 21.3)))
217209

218-
// LLVM 11
219-
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \
220-
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
221-
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \
222-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
223-
# define _LIBCPP_INTRODUCED_IN_LLVM_11 0
224-
# else
225-
# define _LIBCPP_INTRODUCED_IN_LLVM_11 1
226-
# endif
227-
# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE \
228-
__attribute__((availability(macos, strict, introduced = 11.0))) \
229-
__attribute__((availability(ios, strict, introduced = 14.0))) \
230-
__attribute__((availability(tvos, strict, introduced = 14.0))) \
231-
__attribute__((availability(watchos, strict, introduced = 7.0)))
232-
233-
// LLVM 9
234-
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) || \
235-
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
236-
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \
237-
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
238-
# define _LIBCPP_INTRODUCED_IN_LLVM_9 0
239-
# else
240-
# define _LIBCPP_INTRODUCED_IN_LLVM_9 1
241-
# endif
242-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE \
243-
__attribute__((availability(macos, strict, introduced = 10.15))) \
244-
__attribute__((availability(ios, strict, introduced = 13.0))) \
245-
__attribute__((availability(tvos, strict, introduced = 13.0))) \
246-
__attribute__((availability(watchos, strict, introduced = 6.0)))
247-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH \
248-
_Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
249-
_Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \
250-
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \
251-
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
252-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP \
253-
_Pragma("clang attribute pop") \
254-
_Pragma("clang attribute pop") \
255-
_Pragma("clang attribute pop") \
256-
_Pragma("clang attribute pop")
257-
258-
// clang-format on
259-
260210
#else
261211

262212
// ...New vendors can add availability markup here...
@@ -266,20 +216,6 @@
266216

267217
#endif
268218

269-
// These macros control the availability of all parts of <filesystem> that
270-
// depend on something in the dylib.
271-
#define _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9
272-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE
273-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH
274-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP
275-
276-
// This controls the availability of the C++20 synchronization library,
277-
// which requires shared library support for various operations
278-
// (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
279-
// <semaphore>, and notification functions on std::atomic.
280-
#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11
281-
#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE
282-
283219
// Enable additional explicit instantiations of iostreams components. This
284220
// reduces the number of weak definitions generated in programs that use
285221
// iostreams by providing a single strong definition in the shared library.

libcxx/include/__filesystem/directory_entry.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ _LIBCPP_PUSH_MACROS
4040

4141
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
4242

43-
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
44-
4543
class directory_entry {
4644
typedef filesystem::path _Path;
4745

@@ -459,8 +457,6 @@ class __dir_element_proxy {
459457
directory_entry __elem_;
460458
};
461459

462-
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
463-
464460
_LIBCPP_END_NAMESPACE_FILESYSTEM
465461

466462
#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM

0 commit comments

Comments
 (0)