aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-03-22 14:43:41 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-03-22 14:43:41 +0000
commitc24d72154e95545dcd6d74c893082d11fd51053d (patch)
tree48ddcf829a17267053598a7d27a78361aa62387c /lib/Sema/SemaTemplate.cpp
parent053f4bddcb10bd3b17cd6a66fe52e265498603ed (diff)
When handling a TSK_ExplicitInstantiationDefinition after a
TSK_ExplicitInstantiationDeclaration make sure we call MaybeMarkVirtualMembersReferenced with a method attached to the definition. Remove the hack that forced vtable emition with declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 434d5563e1..5951549d9d 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -4388,8 +4388,12 @@ Sema::ActOnExplicitInstantiation(Scope *S,
// Instantiate the members of this class template specialization.
Def = cast_or_null<ClassTemplateSpecializationDecl>(
Specialization->getDefinition());
- if (Def)
+ if (Def) {
+ // Fix a TSK_ExplicitInstantiationDeclaration followed by a
+ // TSK_ExplicitInstantiationDefinition
+ Def->setTemplateSpecializationKind(TSK);
InstantiateClassTemplateSpecializationMembers(TemplateNameLoc, Def, TSK);
+ }
return DeclPtrTy::make(Specialization);
}