hanchenye-llvm-project/libcxx
Shoaib Meenai bda3c7df78 [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
2017-03-02 03:22:18 +00:00
..
benchmarks improve performance of string::find 2016-12-30 18:01:36 +00:00
cmake Recommit "Split exception.cpp and new.cpp implementation into different files for different runtimes." 2017-02-10 08:57:35 +00:00
docs [libc++] Make _LIBCPP_TYPE_VIS export members 2017-03-02 03:22:18 +00:00
include [libc++] Make _LIBCPP_TYPE_VIS export members 2017-03-02 03:22:18 +00:00
lib [libc++] Make _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS export members 2017-03-02 03:02:50 +00:00
src [libcxx] Support threads on Fuchsia 2017-03-01 03:09:18 +00:00
test Remove more usages of REQUIRES-ANY in the test-suite 2017-03-02 02:04:49 +00:00
utils Fix python 3 syntax error in sym_diff 2017-03-02 00:03:01 +00:00
www Update all bug URL's to point to https://bugs.llvm.org/... 2017-02-17 08:37:03 +00:00
.arcconfig
.clang-format Tweak .clang-format configuration. 2017-01-14 05:43:02 +00:00
.gitignore
CMakeLists.txt Generate the test configuration even when LIBCXX_INCLUDE_TESTS=OFF. 2017-03-01 21:53:30 +00:00
CREDITS.TXT Added "Michael Park" to `CREDITS.TXT`. 2017-01-07 10:19:24 +00:00
LICENSE.TXT Update year to 2017 2017-01-03 11:20:43 +00:00
NOTES.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00
TODO.TXT Update doc and various cleanup 2016-12-23 20:00:13 +00:00