Skip to content

Commit

Permalink
[libc++] Fix too stringent availability markup for bad_optional_access
Browse files Browse the repository at this point in the history
The availability markup for bad_optional_access marked it as being added
in MacOS 10.14 and aligned releases, however it appears to have been added
in Mac OS 10.13 and aligned releases.
  • Loading branch information
ldionne committed Jun 9, 2020
1 parent e7c5412 commit 7fb40e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1392,10 +1392,10 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
__attribute__((availability(tvos,strict,introduced=10.0))) \
__attribute__((availability(watchos,strict,introduced=3.0)))
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \
__attribute__((availability(macosx,strict,introduced=10.14))) \
__attribute__((availability(ios,strict,introduced=12.0))) \
__attribute__((availability(tvos,strict,introduced=12.0))) \
__attribute__((availability(watchos,strict,introduced=5.0)))
__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)))
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \
Expand Down
4 changes: 2 additions & 2 deletions libcxx/utils/libcxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,8 @@ def configure_deployment(self):
self.config.available_features.add('dylib-has-no-shared_mutex')
self.lit_config.note("shared_mutex is not supported by the deployment target")
# Throwing bad_optional_access, bad_variant_access and bad_any_cast is
# supported starting in macosx10.14.
if name == 'macosx' and version in ('10.%s' % v for v in range(9, 14)):
# supported starting in macosx10.13.
if name == 'macosx' and version in ('10.%s' % v for v in range(9, 13)):
self.config.available_features.add('dylib-has-no-bad_optional_access')
self.lit_config.note("throwing bad_optional_access is not supported by the deployment target")

Expand Down

0 comments on commit 7fb40e1

Please sign in to comment.