summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-30 17:40:51 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-30 17:40:51 +0000
commit1530138fd04d7fa9ceb0ba84ff2df131f8f7fef0 (patch)
tree2e8783f24c411501563ef626afb34ed2aa7173b7 /clang/lib/AST/DeclTemplate.cpp
parent132f78395a9b15aa3aa1a54951060871ca5fefc2 (diff)
downloadbcm5719-llvm-1530138fd04d7fa9ceb0ba84ff2df131f8f7fef0.tar.gz
bcm5719-llvm-1530138fd04d7fa9ceb0ba84ff2df131f8f7fef0.zip
Support out-of-line definitions of the members of class template
partial specializations. llvm-svn: 77606
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
-rw-r--r--clang/lib/AST/DeclTemplate.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp
index 4677d17dc93..6b3ea437ab6 100644
--- a/clang/lib/AST/DeclTemplate.cpp
+++ b/clang/lib/AST/DeclTemplate.cpp
@@ -161,6 +161,21 @@ void ClassTemplateDecl::Destroy(ASTContext& C) {
C.Deallocate((void*)this);
}
+ClassTemplatePartialSpecializationDecl *
+ClassTemplateDecl::findPartialSpecialization(QualType T) {
+ ASTContext &Context = getASTContext();
+ typedef llvm::FoldingSet<ClassTemplatePartialSpecializationDecl>::iterator
+ partial_spec_iterator;
+ for (partial_spec_iterator P = getPartialSpecializations().begin(),
+ PEnd = getPartialSpecializations().end();
+ P != PEnd; ++P) {
+ if (Context.hasSameType(Context.getTypeDeclType(&*P), T))
+ return &*P;
+ }
+
+ return 0;
+}
+
QualType ClassTemplateDecl::getInjectedClassNameType(ASTContext &Context) {
if (!CommonPtr->InjectedClassNameType.isNull())
return CommonPtr->InjectedClassNameType;
OpenPOWER on IntegriCloud