[cfe-commits] Small visibility fix

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jul 28 05:53:17 PDT 2012


The attached patch fixes the visibility for

template<int i>
class __attribute__((visibility("hidden"))) a {};
template<int i>
class __attribute__((visibility("default"))) b {};
template<template<int> class x, template<int> class y>
void test() {}
void use() {
  test<a, b>();
  test<b, a>();
}

Note that gcc produces a default symbol for these, but it also
produces a visible symbol for

namespace {
  template<int i>
  class  a {};
  template<int i>
  class  b {};
}
template<template<int> class x, template<int> class y>
void test() {}
void use() {
  test<a, b>();
  test<b, a>();
}

so it looks like they just ignore template parameters.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 1609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120728/7b42d48c/attachment.obj>


More information about the cfe-commits mailing list