Author: ericwf
Date: Fri Oct 7 18:07:59 2016
New Revision: 283620
URL: http://llvm.org/viewvc/llvm-project?rev=283620&view=rev
Log:
Fix PR30642 - libc++ leaks always-visible symbols into programs
This was caused by r281673, specifically changing
`_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS`
from `__attribute__((__type_visibility__("default")))` to
`__attribute__((__visibility("default")))`.
I made that change because I thought the external instantiations needed
their members to have default visibility. However since libc++ never builds
with -fvisibility=hidden this appears not to be needed. Instead this change
caused previously hidden inline methods to become un-hidden, which is a
regression.
This patch reverts the problematic change and fixes PR30642.
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL:
http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=283620&r1=283619&r2=283620&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Fri Oct 7 18:07:59 2016
@@ -589,7 +589,7 @@ namespace std {
#ifndef _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
# if __has_attribute(__type_visibility__)
-# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__
((__visibility__("default")))
+# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __attribute__
((__type_visibility__("default")))
# else
# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
# endif
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits