@@ -735,6 +735,7 @@ class RedeclarableTemplateDecl : public TemplateDecl,
735735 }
736736
737737 void anchor () override ;
738+
738739protected:
739740 template <typename EntryType> struct SpecEntryTraits {
740741 using DeclType = EntryType;
@@ -775,13 +776,22 @@ class RedeclarableTemplateDecl : public TemplateDecl,
775776 return SpecIterator<EntryType>(isEnd ? Specs.end () : Specs.begin ());
776777 }
777778
778- void loadLazySpecializationsImpl () const ;
779+ void loadLazySpecializationsImpl (bool OnlyPartial = false ) const ;
780+
781+ bool loadLazySpecializationsImpl (llvm::ArrayRef<TemplateArgument> Args,
782+ TemplateParameterList *TPL = nullptr ) const ;
779783
780784 template <class EntryType , typename ...ProfileArguments>
781785 typename SpecEntryTraits<EntryType>::DeclType*
782786 findSpecializationImpl (llvm::FoldingSetVector<EntryType> &Specs,
783787 void *&InsertPos, ProfileArguments &&...ProfileArgs);
784788
789+ template <class EntryType , typename ... ProfileArguments>
790+ typename SpecEntryTraits<EntryType>::DeclType *
791+ findSpecializationLocally (llvm::FoldingSetVector<EntryType> &Specs,
792+ void *&InsertPos,
793+ ProfileArguments &&...ProfileArgs);
794+
785795 template <class Derived , class EntryType >
786796 void addSpecializationImpl (llvm::FoldingSetVector<EntryType> &Specs,
787797 EntryType *Entry, void *InsertPos);
@@ -796,13 +806,6 @@ class RedeclarableTemplateDecl : public TemplateDecl,
796806 // / was explicitly specialized.
797807 llvm::PointerIntPair<RedeclarableTemplateDecl *, 1 , bool >
798808 InstantiatedFromMember;
799-
800- // / If non-null, points to an array of specializations (including
801- // / partial specializations) known only by their external declaration IDs.
802- // /
803- // / The first value in the array is the number of specializations/partial
804- // / specializations that follow.
805- GlobalDeclID *LazySpecializations = nullptr ;
806809 };
807810
808811 // / Pointer to the common data shared by all declarations of this
@@ -2283,7 +2286,7 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl {
22832286 friend class TemplateDeclInstantiator ;
22842287
22852288 // / Load any lazily-loaded specializations from the external source.
2286- void LoadLazySpecializations () const ;
2289+ void LoadLazySpecializations (bool OnlyPartial = false ) const ;
22872290
22882291 // / Get the underlying class declarations of the template.
22892292 CXXRecordDecl *getTemplatedDecl () const {
@@ -3033,7 +3036,7 @@ class VarTemplateDecl : public RedeclarableTemplateDecl {
30333036 friend class ASTDeclWriter ;
30343037
30353038 // / Load any lazily-loaded specializations from the external source.
3036- void LoadLazySpecializations () const ;
3039+ void LoadLazySpecializations (bool OnlyPartial = false ) const ;
30373040
30383041 // / Get the underlying variable declarations of the template.
30393042 VarDecl *getTemplatedDecl () const {
0 commit comments