diff options
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 4590195d6b31..5aebc2b764c0 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -145,7 +145,7 @@ RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() { template <class EntryType> typename RedeclarableTemplateDecl::SpecEntryTraits<EntryType>::DeclType* RedeclarableTemplateDecl::findSpecializationImpl( - llvm::FoldingSet<EntryType> &Specs, + llvm::FoldingSetVector<EntryType> &Specs, const TemplateArgument *Args, unsigned NumArgs, void *&InsertPos) { typedef SpecEntryTraits<EntryType> SETraits; @@ -298,13 +298,13 @@ void ClassTemplateDecl::LoadLazySpecializations() { } } -llvm::FoldingSet<ClassTemplateSpecializationDecl> & +llvm::FoldingSetVector<ClassTemplateSpecializationDecl> & ClassTemplateDecl::getSpecializations() { LoadLazySpecializations(); return getCommonPtr()->Specializations; } -llvm::FoldingSet<ClassTemplatePartialSpecializationDecl> & +llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl> & ClassTemplateDecl::getPartialSpecializations() { LoadLazySpecializations(); return getCommonPtr()->PartialSpecializations; @@ -363,11 +363,11 @@ void ClassTemplateDecl::AddPartialSpecialization( void ClassTemplateDecl::getPartialSpecializations( SmallVectorImpl<ClassTemplatePartialSpecializationDecl *> &PS) { - llvm::FoldingSet<ClassTemplatePartialSpecializationDecl> &PartialSpecs + llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl> &PartialSpecs = getPartialSpecializations(); PS.clear(); PS.resize(PartialSpecs.size()); - for (llvm::FoldingSet<ClassTemplatePartialSpecializationDecl>::iterator + for (llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl>::iterator P = PartialSpecs.begin(), PEnd = PartialSpecs.end(); P != PEnd; ++P) { assert(!PS[P->getSequenceNumber()]); @@ -378,7 +378,8 @@ void ClassTemplateDecl::getPartialSpecializations( ClassTemplatePartialSpecializationDecl * ClassTemplateDecl::findPartialSpecialization(QualType T) { ASTContext &Context = getASTContext(); - typedef llvm::FoldingSet<ClassTemplatePartialSpecializationDecl>::iterator + using llvm::FoldingSetVector; + typedef FoldingSetVector<ClassTemplatePartialSpecializationDecl>::iterator partial_spec_iterator; for (partial_spec_iterator P = getPartialSpecializations().begin(), PEnd = getPartialSpecializations().end(); @@ -394,7 +395,7 @@ ClassTemplatePartialSpecializationDecl * ClassTemplateDecl::findPartialSpecInstantiatedFromMember( ClassTemplatePartialSpecializationDecl *D) { Decl *DCanon = D->getCanonicalDecl(); - for (llvm::FoldingSet<ClassTemplatePartialSpecializationDecl>::iterator + for (llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl>::iterator P = getPartialSpecializations().begin(), PEnd = getPartialSpecializations().end(); P != PEnd; ++P) { @@ -868,5 +869,6 @@ ClassScopeFunctionSpecializationDecl::CreateDeserialized(ASTContext &C, unsigned ID) { void *Mem = AllocateDeserializedDecl(C, ID, sizeof(ClassScopeFunctionSpecializationDecl)); - return new (Mem) ClassScopeFunctionSpecializationDecl(0, SourceLocation(), 0); + return new (Mem) ClassScopeFunctionSpecializationDecl(0, SourceLocation(), 0, + false, TemplateArgumentListInfo()); } |