@@ -1119,6 +1119,20 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
11191119 return makeSpecIterator (getSpecializations (), true );
11201120 }
11211121
1122+ // / All specializations that that have already been loaded, ie avoiding
1123+ // / deserialization of lazily registered specializations.
1124+ spec_range loaded_specializations () const {
1125+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
1126+ }
1127+
1128+ spec_iterator loaded_spec_begin () const {
1129+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
1130+ }
1131+
1132+ spec_iterator loaded_spec_end () const {
1133+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
1134+ }
1135+
11221136 // / Retrieve the "injected" template arguments that correspond to the
11231137 // / template parameters of this function template.
11241138 // /
@@ -2448,6 +2462,20 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl {
24482462 return makeSpecIterator (getSpecializations (), true );
24492463 }
24502464
2465+ // / All specializations that that have already been loaded, ie avoiding
2466+ // / deserialization of lazily registered specializations.
2467+ spec_range loaded_specializations () const {
2468+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
2469+ }
2470+
2471+ spec_iterator loaded_spec_begin () const {
2472+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
2473+ }
2474+
2475+ spec_iterator loaded_spec_end () const {
2476+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
2477+ }
2478+
24512479 // Implement isa/cast/dyncast support
24522480 static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
24532481 static bool classofKind (Kind K) { return K == ClassTemplate; }
@@ -3251,6 +3279,20 @@ class VarTemplateDecl : public RedeclarableTemplateDecl {
32513279 return makeSpecIterator (getSpecializations (), true );
32523280 }
32533281
3282+ // / All specializations that that have already been loaded, ie avoiding
3283+ // / deserialization of lazily registered specializations.
3284+ spec_range loaded_specializations () const {
3285+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
3286+ }
3287+
3288+ spec_iterator loaded_spec_begin () const {
3289+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
3290+ }
3291+
3292+ spec_iterator loaded_spec_end () const {
3293+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
3294+ }
3295+
32543296 // Implement isa/cast/dyncast support
32553297 static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
32563298 static bool classofKind (Kind K) { return K == VarTemplate; }
0 commit comments