instantiation depends on the template, its arguments and parameters, but not
where it is instantiated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160034
91177308-0d34-0410-b5e6-
96231b3b80d8
// If there's a #pragma GCC visibility in scope, and this isn't a subclass,
// set the visibility of this record.
- if (Record && !Record->getDeclContext()->isRecord())
+ if (Record && !Record->getDeclContext()->isRecord() &&
+ !isa<ClassTemplateSpecializationDecl>(Record))
AddPushedVisibilityAttribute(Record);
}
// CHECK: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
// CHECK-HIDDEN: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
}
+
+namespace test53 {
+ template<typename _Tp > struct vector {
+ static void _M_fill_insert();
+ };
+#pragma GCC visibility push(hidden)
+ void foo() {
+ vector<unsigned>::_M_fill_insert();
+ }
+#pragma GCC visibility pop
+ // CHECK: declare void @_ZN6test536vectorIjE14_M_fill_insertEv
+ // CHECK-HIDDEN: declare void @_ZN6test536vectorIjE14_M_fill_insertEv
+}