forked from OSchip/llvm-project
Process attributes in explicit function template instantiations. Fixes part of
PR11690. llvm-svn: 147523
This commit is contained in:
parent
36d129435e
commit
2aa7acfadb
|
@ -6407,6 +6407,9 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
|
|||
}
|
||||
|
||||
Specialization->setTemplateSpecializationKind(TSK, D.getIdentifierLoc());
|
||||
AttributeList *Attr = D.getDeclSpec().getAttributes().getList();
|
||||
if (Attr)
|
||||
ProcessDeclAttributeList(S, Specialization, Attr);
|
||||
|
||||
if (TSK == TSK_ExplicitInstantiationDefinition)
|
||||
InstantiateFunctionDefinition(D.getIdentifierLoc(), Specialization);
|
||||
|
|
|
@ -475,4 +475,9 @@ namespace PR11690 {
|
|||
template class DEFAULT Class<char>;
|
||||
// CHECK: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
|
||||
// CHECK-HIDDEN: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
|
||||
|
||||
template<class T> void Method() {}
|
||||
template __attribute__((visibility("default"))) void Method<char>();
|
||||
// CHECK: define weak_odr void @_ZN7PR116906MethodIcEEvv
|
||||
// CHECK-HIDDEN: define weak_odr void @_ZN7PR116906MethodIcEEvv
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue