summaryrefslogtreecommitdiffstats
path: root/libcxx/include/experimental
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2017-05-04 17:08:54 +0000
committerMehdi Amini <joker.eph@gmail.com>2017-05-04 17:08:54 +0000
commite9c66ad9fa9f1c1138c2a4868610e1d77271216c (patch)
tree622d32e491f918b6603f83aabac0930f87f27d1d /libcxx/include/experimental
parent93c68e11893e895a3f70b848c4f6589920c1d2e6 (diff)
downloadbcm5719-llvm-e9c66ad9fa9f1c1138c2a4868610e1d77271216c.tar.gz
bcm5719-llvm-e9c66ad9fa9f1c1138c2a4868610e1d77271216c.zip
Add markup for libc++ dylib availability
Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
Diffstat (limited to 'libcxx/include/experimental')
-rw-r--r--libcxx/include/experimental/dynarray2
-rw-r--r--libcxx/include/experimental/optional9
2 files changed, 7 insertions, 4 deletions
diff --git a/libcxx/include/experimental/dynarray b/libcxx/include/experimental/dynarray
index 8c9733770c3..f96a0e5fed3 100644
--- a/libcxx/include/experimental/dynarray
+++ b/libcxx/include/experimental/dynarray
@@ -110,7 +110,7 @@ public:
namespace std { namespace experimental { inline namespace __array_extensions_v1 {
template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS dynarray
+struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_DYNARRAY dynarray
{
public:
// types:
diff --git a/libcxx/include/experimental/optional b/libcxx/include/experimental/optional
index f32941b1a8e..48adfbae516 100644
--- a/libcxx/include/experimental/optional
+++ b/libcxx/include/experimental/optional
@@ -145,7 +145,7 @@ namespace std { namespace experimental { inline namespace fundamentals_v1 {
#include <stdexcept>
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
-class _LIBCPP_EXCEPTION_ABI bad_optional_access
+class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
: public std::logic_error
{
public:
@@ -523,6 +523,9 @@ public:
constexpr explicit operator bool() const noexcept {return this->__engaged_;}
_LIBCPP_NORETURN _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCPP_NO_EXCEPTIONS
+_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#endif
constexpr void __throw_bad_optional_access() const
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -532,7 +535,7 @@ public:
#endif
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
constexpr value_type const& value() const
{
if (!this->__engaged_)
@@ -540,7 +543,7 @@ public:
return this->__val_;
}
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
value_type& value()
{
if (!this->__engaged_)
OpenPOWER on IntegriCloud