r175326 - Rework the visibility computation algorithm in preparation

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Feb 21 09:14:01 PST 2013


> Yes, I think this definition clearly ought to get default visibility
> regardless of compilation settings.

I tried to take a look but got lost at what is explicit or implicit
specialization. Given

class foo {};
class foo2 {};
template<typename T>
class bar {
  void g();
};
template<>
class __attribute__((visibility("default"))) bar<foo> {
  void g();
};
void bar<foo>::g() {
}
template<>
__attribute__((visibility("default"))) void bar<foo2>::g();
template<>
void bar<foo2>::g() {
}

we produce a default symbol for bar<foo>::g and a hidden one for
bar<foo2>::g because bar<foo2> is marked as a implicit instantiation.

> John.

Cheers,
Rafael



More information about the cfe-commits mailing list