File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -456,14 +456,7 @@ template<typename T> class TypeHierarchyPropagator {
456
456
// Propagate shared fields to the subtypes, which may just be the exact
457
457
// version of the same type.
458
458
auto numFields = type.getStruct ().fields .size ();
459
- std::vector<std::pair<HeapType, Exactness>> subs;
460
- if (includeExact) {
461
- subs.emplace_back (type, Exact);
462
- }
463
- for (auto subType : subTypes.getImmediateSubTypes (type)) {
464
- subs.emplace_back (subType, Inexact);
465
- }
466
- for (auto sub : subs) {
459
+ auto handleSubtype = [&](std::pair<HeapType, Exactness> sub) {
467
460
auto & subInfos = combinedInfos[sub];
468
461
for (Index i = 0 ; i < numFields; i++) {
469
462
if (subInfos[i].combine (infos[i])) {
@@ -474,6 +467,12 @@ template<typename T> class TypeHierarchyPropagator {
474
467
if (subInfos.desc .combine (infos.desc )) {
475
468
work.push (sub);
476
469
}
470
+ };
471
+ if (includeExact) {
472
+ handleSubtype ({type, Exact});
473
+ }
474
+ for (auto subType : subTypes.getImmediateSubTypes (type)) {
475
+ handleSubtype ({subType, Inexact});
477
476
}
478
477
}
479
478
}
You can’t perform that action at this time.
0 commit comments