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

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Jan 4 17:25:29 PST 2012


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 embedded and charset-unspecified text was scrubbed...
Name: pr10113.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120104/9e1c63cf/attachment.ksh>


More information about the cfe-commits mailing list