[libc++] Hide some functions and types in <future> and <thread> as hidden
Otherwise, weak symbols leak into user programs when using `async` with
non-internal types.
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: dd37e24ae62329d8376b7989dc2e3a53be30622a
diff --git a/include/future b/include/future
index 6da88c6..deb7725 100644
--- a/include/future
+++ b/include/future
@@ -611,7 +611,7 @@
}
template <class _Rp>
-class _LIBCPP_AVAILABILITY_FUTURE __assoc_state
+class _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_HIDDEN __assoc_state
: public __assoc_sub_state
{
typedef __assoc_sub_state base;
@@ -1060,7 +1060,7 @@
template <class _Rp> class _LIBCPP_TEMPLATE_VIS future;
template <class _Rp, class _Fp>
-future<_Rp>
+_LIBCPP_INLINE_VISIBILITY future<_Rp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__make_deferred_assoc_state(_Fp&& __f);
#else
@@ -1068,7 +1068,7 @@
#endif
template <class _Rp, class _Fp>
-future<_Rp>
+_LIBCPP_INLINE_VISIBILITY future<_Rp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__make_async_assoc_state(_Fp&& __f);
#else
@@ -2266,7 +2266,7 @@
: public true_type {};
template <class _Rp, class _Fp>
-future<_Rp>
+_LIBCPP_INLINE_VISIBILITY future<_Rp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__make_deferred_assoc_state(_Fp&& __f)
#else
@@ -2279,7 +2279,7 @@
}
template <class _Rp, class _Fp>
-future<_Rp>
+_LIBCPP_INLINE_VISIBILITY future<_Rp>
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
__make_async_assoc_state(_Fp&& __f)
#else
@@ -2293,7 +2293,7 @@
}
template <class _Fp, class... _Args>
-class __async_func
+class _LIBCPP_HIDDEN __async_func
{
tuple<_Fp, _Args...> __f_;