Go to file
Shoaib Meenai bad28c44eb [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members
When building libc++ with hidden visibility, we want explicit template
instantiations to export members. This is consistent with existing
Windows behavior, and is necessary for clients to be able to link
against a hidden visibility built libc++ without running into lots of
missing symbols.

An unfortunate side effect, however, is that any template methods of a
class with an explicit instantiation will get default visibility when
instantiated, unless the methods are explicitly marked inline or hidden
visibility. This is not desirable for clients of libc++ headers who wish
to control their visibility, and led to PR30642.

Annotate all problematic methods with an explicit visibility specifier
to avoid this. The problematic methods were found by running
https://github.com/smeenai/bad-visibility-finder against the libc++
headers after making the _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS change. The
methods were marked with the new _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
macro, which was created for this purpose.

It should be noted that _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS was originally
intended to expand to default visibility, and was changed to expanding
to default type visibility to fix PR30642. The visibility macro
documentation was not updated accordingly, however, so this change makes
the macro consistent with its documentation again, while explicitly
fixing the methods which resulted in that PR.

Differential Revision: https://reviews.llvm.org/D29157

llvm-svn: 296731
2017-03-02 03:02:50 +00:00
clang clang-format: [JS] Properly format object literals with shorthands. 2017-03-01 19:47:28 +00:00
clang-tools-extra [clangd] Unbreak the shared build. 2017-03-01 16:23:40 +00:00
compiler-rt Revert "Use pthreads for thread-local lsan allocator cache on darwin" 2017-03-02 00:12:58 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members 2017-03-02 03:02:50 +00:00
libcxxabi Cleanup new/delete definitions 2017-03-01 23:59:34 +00:00
libunwind Fix the project name in the license file. 2017-02-27 17:47:58 +00:00
lld Address a few nits pointed out by Sean. 2017-03-02 02:24:31 +00:00
lldb Fix various warnings. NFC 2017-03-02 00:05:25 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm cmake: Configure the ThinLTO cache directory when using ELF lld or gold. 2017-03-02 03:01:12 +00:00
openmp Removing couple unnecessary architecture guards. 2017-02-28 21:43:28 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Disable memory folding in case it results in multi-disjunct relations 2017-03-01 21:11:27 +00:00