@@ -1084,6 +1084,20 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
1084
1084
return makeSpecIterator (getSpecializations (), true );
1085
1085
}
1086
1086
1087
+ // / All specializations that that have already been loaded, ie avoiding
1088
+ // / deserialization of lazily registered specializations.
1089
+ spec_range loaded_specializations () const {
1090
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
1091
+ }
1092
+
1093
+ spec_iterator loaded_spec_begin () const {
1094
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
1095
+ }
1096
+
1097
+ spec_iterator loaded_spec_end () const {
1098
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
1099
+ }
1100
+
1087
1101
// / Return whether this function template is an abbreviated function template,
1088
1102
// / e.g. `void foo(auto x)` or `template<typename T> void foo(auto x)`
1089
1103
bool isAbbreviated () const {
@@ -2421,6 +2435,20 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl {
2421
2435
return makeSpecIterator (getSpecializations (), true );
2422
2436
}
2423
2437
2438
+ // / All specializations that that have already been loaded, ie avoiding
2439
+ // / deserialization of lazily registered specializations.
2440
+ spec_range loaded_specializations () const {
2441
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
2442
+ }
2443
+
2444
+ spec_iterator loaded_spec_begin () const {
2445
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
2446
+ }
2447
+
2448
+ spec_iterator loaded_spec_end () const {
2449
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
2450
+ }
2451
+
2424
2452
// Implement isa/cast/dyncast support
2425
2453
static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
2426
2454
static bool classofKind (Kind K) { return K == ClassTemplate; }
@@ -3166,6 +3194,20 @@ class VarTemplateDecl : public RedeclarableTemplateDecl {
3166
3194
return makeSpecIterator (getSpecializations (), true );
3167
3195
}
3168
3196
3197
+ // / All specializations that that have already been loaded, ie avoiding
3198
+ // / deserialization of lazily registered specializations.
3199
+ spec_range loaded_specializations () const {
3200
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
3201
+ }
3202
+
3203
+ spec_iterator loaded_spec_begin () const {
3204
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
3205
+ }
3206
+
3207
+ spec_iterator loaded_spec_end () const {
3208
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
3209
+ }
3210
+
3169
3211
// Implement isa/cast/dyncast support
3170
3212
static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
3171
3213
static bool classofKind (Kind K) { return K == VarTemplate; }
0 commit comments