[cfe-commits] [PATCH] libc++ visibility fixes

Howard Hinnant hhinnant at apple.com
Thu Sep 13 17:41:39 PDT 2012


On Sep 10, 2012, at 2:58 PM, Dimitry Andric <dimitry at andric.com> wrote:

> On 2012-09-10 22:51, Dimitry Andric wrote:...
>> In a follow-up post, I will attempt to do the same for when the first
>> line of the testcase is #pragma GCC visibility push(hidden).  This leads
>> to a whole bunch of other errors, which have only been partially solved
>> by the fix for PR 13662.
> 
> So here's the follow-up already. :)  Since it doesn't make too much
> sense to have a separate patch for the case of pushed hidden
> visibility, I have just attached the complete version now.
> 
> This survives both testcases, with just a few warnings about hash_map
> being deprecated:
> 
>  clang -std=c++11 -stdlib=libc++ -c libcxx-visibility-default-testcase.cpp
>  clang -std=c++11 -stdlib=libc++ -c libcxx-visibility-hidden-testcase.cpp
> 
> Btw, I tried compiling these with -D_LIBCPP_DEBUG defined, but that
> leads to quite a number of errors of the form:
> 
>  In file included from libcxx-visibility-hidden-testcase.cpp:2:
>  In file included from /usr/include/c++/v1/algorithm:594:
>  In file included from /usr/include/c++/v1/memory:596:
>  /usr/include/c++/v1/iterator:1439:30: error: elaborated type refers to a typedef
>      friend class _Container::__self;
>                               ^
>  /usr/include/c++/v1/regex:1144:28: note: in instantiation of template class 'std::__1::__debug_iter<std::__1::basic_string<char>, char *>' requested here
>              __r.assign(__n.begin(), __n.end());
>                             ^
>  /usr/include/c++/v1/string:1043:58: note: declared here
>      typedef typename basic_string                        __self;
>                                                           ^
> 
> Any idea what is going on?  Is _LIBCPP_DEBUG currently broken?
> 
> -Dimitry
> <libcxx-visibility-3.diff><libcxx-visibility-default-testcase.cpp><libcxx-visibility-hidden-testcase.cpp>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Committed revision 163862.

Thanks!

A CREDITS.TXT patch would be in order.

Howard




More information about the cfe-commits mailing list