@@ -749,11 +749,12 @@ namespace {
749
749
RetTy visitTupleType (CanTupleType type, AbstractionPattern origType,
750
750
IsTypeExpansionSensitive_t isSensitive) {
751
751
RecursiveProperties props;
752
- for (unsigned i = 0 , e = type->getNumElements (); i < e; ++i) {
753
- props.addSubobject (classifyType (origType.getTupleElementType (i),
754
- type.getElementType (i),
755
- TC, Expansion));
756
- }
752
+ origType.forEachExpandedTupleElement (type,
753
+ [&](AbstractionPattern origEltType, CanType substEltType,
754
+ const TupleTypeElt &elt) {
755
+ props.addSubobject (
756
+ classifyType (origEltType, substEltType, TC, Expansion));
757
+ });
757
758
props = mergeIsTypeExpansionSensitive (isSensitive, props);
758
759
return asImpl ().handleAggregateByProperties (type, props);
759
760
}
@@ -2250,12 +2251,12 @@ namespace {
2250
2251
AbstractionPattern origType,
2251
2252
IsTypeExpansionSensitive_t isSensitive) {
2252
2253
RecursiveProperties properties;
2253
- for ( unsigned i = 0 , e = tupleType-> getNumElements (); i < e; ++i) {
2254
- auto eltType = tupleType. getElementType (i);
2255
- auto origEltType = origType. getTupleElementType (i);
2256
- auto &lowering = TC. getTypeLowering (origEltType, eltType, Expansion);
2257
- properties. addSubobject (lowering. getRecursiveProperties ( ));
2258
- }
2254
+ origType. forEachExpandedTupleElement ( tupleType,
2255
+ [&](AbstractionPattern origEltType, CanType substEltType,
2256
+ const TupleTypeElt &elt) {
2257
+ properties. addSubobject (
2258
+ classifyType (origEltType, substEltType, TC, Expansion ));
2259
+ });
2259
2260
properties = mergeIsTypeExpansionSensitive (isSensitive, properties);
2260
2261
2261
2262
return handleAggregateByProperties<LoadableTupleTypeLowering>(tupleType,
0 commit comments