@@ -1112,6 +1112,20 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
1112
1112
return makeSpecIterator (getSpecializations (), true );
1113
1113
}
1114
1114
1115
+ // / All specializations that that have already been loaded, ie avoiding
1116
+ // / deserialization of lazily registered specializations.
1117
+ spec_range loaded_specializations () const {
1118
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
1119
+ }
1120
+
1121
+ spec_iterator loaded_spec_begin () const {
1122
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
1123
+ }
1124
+
1125
+ spec_iterator loaded_spec_end () const {
1126
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
1127
+ }
1128
+
1115
1129
// / Return whether this function template is an abbreviated function template,
1116
1130
// / e.g. `void foo(auto x)` or `template<typename T> void foo(auto x)`
1117
1131
bool isAbbreviated () const {
@@ -2446,6 +2460,20 @@ class ClassTemplateDecl : public RedeclarableTemplateDecl {
2446
2460
return makeSpecIterator (getSpecializations (), true );
2447
2461
}
2448
2462
2463
+ // / All specializations that that have already been loaded, ie avoiding
2464
+ // / deserialization of lazily registered specializations.
2465
+ spec_range loaded_specializations () const {
2466
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
2467
+ }
2468
+
2469
+ spec_iterator loaded_spec_begin () const {
2470
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
2471
+ }
2472
+
2473
+ spec_iterator loaded_spec_end () const {
2474
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
2475
+ }
2476
+
2449
2477
// Implement isa/cast/dyncast support
2450
2478
static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
2451
2479
static bool classofKind (Kind K) { return K == ClassTemplate; }
@@ -3266,6 +3294,20 @@ class VarTemplateDecl : public RedeclarableTemplateDecl {
3266
3294
return makeSpecIterator (getSpecializations (), true );
3267
3295
}
3268
3296
3297
+ // / All specializations that that have already been loaded, ie avoiding
3298
+ // / deserialization of lazily registered specializations.
3299
+ spec_range loaded_specializations () const {
3300
+ return spec_range (loaded_spec_begin (), loaded_spec_end ());
3301
+ }
3302
+
3303
+ spec_iterator loaded_spec_begin () const {
3304
+ return makeSpecIterator (getCommonPtr ()->Specializations , false );
3305
+ }
3306
+
3307
+ spec_iterator loaded_spec_end () const {
3308
+ return makeSpecIterator (getCommonPtr ()->Specializations , true );
3309
+ }
3310
+
3269
3311
// Implement isa/cast/dyncast support
3270
3312
static bool classof (const Decl *D) { return classofKind (D->getKind ()); }
3271
3313
static bool classofKind (Kind K) { return K == VarTemplate; }
0 commit comments