[libcxx-commits] [libcxx] 0bc451e - [libc++] Fix incorrect availability markup for bad_optional_access & friends

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 16 06:03:28 PDT 2022


Author: Louis Dionne
Date: 2022-03-16T09:03:22-04:00
New Revision: 0bc451e7e137c4ccadcd3377250874f641ca514a

URL: https://github.com/llvm/llvm-project/commit/0bc451e7e137c4ccadcd3377250874f641ca514a
DIFF: https://github.com/llvm/llvm-project/commit/0bc451e7e137c4ccadcd3377250874f641ca514a.diff

LOG: [libc++] Fix incorrect availability markup for bad_optional_access & friends

In 7fb40e1569d, 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

Added: 
    

Modified: 
    libcxx/include/__availability

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__availability b/libcxx/include/__availability
index 12eafee99bef6..b0f52ad1e96dd 100644
--- a/libcxx/include/__availability
+++ b/libcxx/include/__availability
@@ -164,11 +164,14 @@
 #       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
 #   endif
 
+        // Note: bad_optional_access & friends were not introduced in the matching
+        // macOS and iOS versions, so the version mismatch between macOS and others
+        // is intended.
 #   define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS                             \
         __attribute__((availability(macosx,strict,introduced=10.13)))           \
-        __attribute__((availability(ios,strict,introduced=11.0)))               \
-        __attribute__((availability(tvos,strict,introduced=11.0)))              \
-        __attribute__((availability(watchos,strict,introduced=4.0)))
+        __attribute__((availability(ios,strict,introduced=12.0)))               \
+        __attribute__((availability(tvos,strict,introduced=12.0)))              \
+        __attribute__((availability(watchos,strict,introduced=5.0)))
 #   define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS                              \
         _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
 #   define _LIBCPP_AVAILABILITY_BAD_ANY_CAST                                    \


        


More information about the libcxx-commits mailing list