[PATCH] D54479: Mark some library types and templates with visibility+availability attributes.

Arthur O'Dwyer via Phabricator reviews at reviews.llvm.org
Tue Nov 13 15:31:29 PST 2018


Quuxplusone updated this revision to Diff 173949.
Quuxplusone added a comment.

Re-add `_LIBCPP_TYPE_VIS` to `__assoc_sub_state` because it is mentioned in the mangled names of functions exported from `src/future.cpp`.
Remove `_LIBCPP_AVAILABILITY_FUTURE` from types that aren't supposed to be visible to user-programmers anyway (IIUC).


Repository:
  rCXX libc++

https://reviews.llvm.org/D54479

Files:
  include/future
  include/shared_mutex


Index: include/shared_mutex
===================================================================
--- include/shared_mutex
+++ include/shared_mutex
@@ -307,7 +307,7 @@
 }
 
 template <class _Mutex>
-class shared_lock
+class _LIBCPP_TEMPLATE_VIS shared_lock
 {
 public:
     typedef _Mutex mutex_type;
Index: include/future
===================================================================
--- include/future
+++ include/future
@@ -528,7 +528,7 @@
 #endif
 }
 
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state
+class _LIBCPP_TYPE_VIS __assoc_sub_state
     : public __shared_count
 {
 protected:
@@ -2369,7 +2369,7 @@
 // shared_future
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future
 {
     __assoc_state<_Rp>* __state_;
 
@@ -2443,7 +2443,7 @@
 }
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future<_Rp&>
+class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future<_Rp&>
 {
     __assoc_state<_Rp&>* __state_;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54479.173949.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181113/8a24868d/attachment.bin>


More information about the libcxx-commits mailing list