[PATCH] D27430: [libc++] Annotate template methods with visibility

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 15:09:45 PST 2016


smeenai created this revision.
smeenai added reviewers: EricWF, mclow.lists.
smeenai added subscribers: cfe-commits, thakis.

https://reviews.llvm.org/D25208 switches `_LIBCPP_TYPE_VIS` to expand to default visibility
instead of default type visibility, in order to ease building libc++
with hidden visibility. With that change made, any template methods of a
class marked `_LIBCPP_TYPE_VIS` will also get default visibility when
implicitly instantiated, which is not desirable for clients of libc++
headers who wish to control their visibility; a similar issue led to
PR30642. Annotate all problematic methods with an explicit visibility
specifier in order to avoid this issue.

The problematic methods were found by applying https://reviews.llvm.org/D25208 and then running
https://github.com/smeenai/bad-visibility-finder. The small methods were
marked for inlining; the larger ones marked hidden.


https://reviews.llvm.org/D27430

Files:
  include/__locale
  include/__mutex_base
  include/condition_variable
  include/future
  include/mutex
  include/thread

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27430.80333.patch
Type: text/x-patch
Size: 3349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161205/c0fb422e/attachment-0001.bin>


More information about the cfe-commits mailing list