Skip to content

Commit 0bc451e

Browse files
committed
[libc++] Fix incorrect availability markup for bad_optional_access & friends
In 7fb40e1, I changed the availability for bad_optional_access and friends from macOS 10.14 to 10.13 after conducting an investigation on old dylibs. It turns out that macOS 10.13 did have bad_optional_access, however the dylib on iOS didn't match the dylib on macOS, so those exception classes were only introduced in iOS 12. Thanks to Aditya Kumar for noticing this. Differential Revision: https://reviews.llvm.org/D121735
1 parent 62a289d commit 0bc451e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libcxx/include/__availability

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,14 @@
164164
# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
165165
# endif
166166

167+
// Note: bad_optional_access & friends were not introduced in the matching
168+
// macOS and iOS versions, so the version mismatch between macOS and others
169+
// is intended.
167170
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \
168171
__attribute__((availability(macosx,strict,introduced=10.13))) \
169-
__attribute__((availability(ios,strict,introduced=11.0))) \
170-
__attribute__((availability(tvos,strict,introduced=11.0))) \
171-
__attribute__((availability(watchos,strict,introduced=4.0)))
172+
__attribute__((availability(ios,strict,introduced=12.0))) \
173+
__attribute__((availability(tvos,strict,introduced=12.0))) \
174+
__attribute__((availability(watchos,strict,introduced=5.0)))
172175
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \
173176
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
174177
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \

0 commit comments

Comments
 (0)