[cfe-commits] [patch][pr10113/pr11690] Remember if the visibility of a type is explicit or not

Ami Fischman fischman at chromium.org
Wed Jan 4 18:13:43 PST 2012


This patch makes chromium (as well as a random selection of test binaries I
tried: media_unittests net_unittests browser_tests ui_tests
test_shell_tests) successfully link in shared_library mode with no
workarounds necessary in the chromium codebase.  Yay!

-a

On Wed, Jan 4, 2012 at 5:25 PM, Rafael Ávila de Espíndola <
rafael.espindola at gmail.com> wrote:

> The attached patch should fix both pr10113 and pr11690.
>
> It remembers if a type has its visibility set explicitly or not and
> centralizes the way we merge visibility. We always prefer explicit over
> implicit and then pick the most restrictive visibility.
>
> This is still more strict than gcc for cases like
>
> -----------------------------------------
> template<class T> class __attribute__((visibility("default"))) foo {
>  void bar() { }
> };
> class __attribute__((visibility("hidden"))) zed;
> template class foo<zed>;
> ----------------------------------------
>
> but should be compatible in any case the type could be used outside of
> this library.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120104/94d3c38d/attachment.html>


More information about the cfe-commits mailing list