diff options
Diffstat (limited to 'src/ir/struct-utils.h')
-rw-r--r-- | src/ir/struct-utils.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ir/struct-utils.h b/src/ir/struct-utils.h index b052a15f7..442d990fb 100644 --- a/src/ir/struct-utils.h +++ b/src/ir/struct-utils.h @@ -222,13 +222,12 @@ private: auto& infos = combinedInfos[type]; // Propagate shared fields to the supertype. - HeapType superType; - if (type.getSuperType(superType)) { - auto& superInfos = combinedInfos[superType]; - auto& superFields = superType.getStruct().fields; + if (auto superType = type.getSuperType()) { + auto& superInfos = combinedInfos[*superType]; + auto& superFields = superType->getStruct().fields; for (Index i = 0; i < superFields.size(); i++) { if (superInfos[i].combine(infos[i])) { - work.push(superType); + work.push(*superType); } } } |