diff options
| author | Shoaib Meenai <smeenai@fb.com> | 2017-03-02 03:22:18 +0000 |
|---|---|---|
| committer | Shoaib Meenai <smeenai@fb.com> | 2017-03-02 03:22:18 +0000 |
| commit | bda3c7df78501378a54e3c4a44d49376d6a2cdda (patch) | |
| tree | dfd60ecac68e2dbc079c855fdb03cb63fb9ae8f2 /libcxx/include/__mutex_base | |
| parent | bad28c44eb1df72ede59c1a56e09b4a2f34688c3 (diff) | |
| download | bcm5719-llvm-bda3c7df78501378a54e3c4a44d49376d6a2cdda.tar.gz bcm5719-llvm-bda3c7df78501378a54e3c4a44d49376d6a2cdda.zip | |
[libc++] Make _LIBCPP_TYPE_VIS export members
Summary:
Most classes annotated with _LIBCPP_TYPE_VIS need to have at least some
of their members exported, otherwise we have a lot of link errors when
linking against a libc++ built with hidden visibility. This also makes
_LIBCPP_TYPE_VIS be consistent across platforms, since on Windows it
already exports members.
With this change made, any template methods of a class marked
_LIBCPP_TYPE_VIS will also get default visibility when instantiatied,
which is not desirable for clients of libc++ headers who wish to control
their visibility; this is the same issue as PR30642. Annotate all
problematic methods with an explicit visibility specifier to avoid this.
The problematic methods were found by running bad-visibility-finder [1]
against the libc++ headers after making the _LIBCPP_TYPE_VIS change. The
small methods were marked for inlining; the larger ones hidden.
[1] https://github.com/smeenai/bad-visibility-finder
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25208
llvm-svn: 296732
Diffstat (limited to 'libcxx/include/__mutex_base')
| -rw-r--r-- | libcxx/include/__mutex_base | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base index 21638ee3292..f76e966e912 100644 --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -316,20 +316,24 @@ public: void wait(unique_lock<mutex>& __lk) _NOEXCEPT; template <class _Predicate> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS void wait(unique_lock<mutex>& __lk, _Predicate __pred); template <class _Clock, class _Duration> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS cv_status wait_until(unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t); template <class _Clock, class _Duration, class _Predicate> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS bool wait_until(unique_lock<mutex>& __lk, const chrono::time_point<_Clock, _Duration>& __t, _Predicate __pred); template <class _Rep, class _Period> + _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS cv_status wait_for(unique_lock<mutex>& __lk, const chrono::duration<_Rep, _Period>& __d); |

