@@ -331,11 +331,13 @@ namespace {
331331 RetTy visitPackExpansionType (CanPackExpansionType type,
332332 AbstractionPattern origType,
333333 IsTypeExpansionSensitive_t isSensitive) {
334- return asImpl ().handleAddressOnly (type, {IsNotTrivial, IsFixedABI,
335- IsAddressOnly, IsNotResilient,
336- isSensitive,
337- DoesNotHaveRawPointer,
338- IsLexical});
334+ RecursiveProperties props;
335+ props.setAddressOnly ();
336+ props.addSubobject (classifyType (origType.getPackExpansionPatternType (),
337+ type.getPatternType (),
338+ TC, Expansion));
339+ props = mergeIsTypeExpansionSensitive (isSensitive, props);
340+ return asImpl ().handleAddressOnly (type, props);
339341 }
340342
341343 RetTy visitBuiltinRawPointerType (CanBuiltinRawPointerType type,
@@ -2193,18 +2195,20 @@ namespace {
21932195 TypeLowering *visitPackType (CanPackType packType,
21942196 AbstractionPattern origType,
21952197 IsTypeExpansionSensitive_t isSensitive) {
2196- RecursiveProperties properties;
2197- properties.setAddressOnly ();
2198- properties = mergeIsTypeExpansionSensitive (isSensitive, properties);
2199-
2200- return handleAddressOnly (packType, properties);
2198+ llvm_unreachable (" shouldn't get here with an unlowered type" );
22012199 }
22022200
22032201 TypeLowering *visitSILPackType (CanSILPackType packType,
22042202 AbstractionPattern origType,
22052203 IsTypeExpansionSensitive_t isSensitive) {
22062204 RecursiveProperties properties;
22072205 properties.setAddressOnly ();
2206+ for (auto i : indices (packType.getElementTypes ())) {
2207+ auto &eltLowering =
2208+ TC.getTypeLowering (packType->getSILElementType (i),
2209+ Expansion);
2210+ properties.addSubobject (eltLowering.getRecursiveProperties ());
2211+ }
22082212 properties = mergeIsTypeExpansionSensitive (isSensitive, properties);
22092213
22102214 return handleAddressOnly (packType, properties);
@@ -2215,6 +2219,11 @@ namespace {
22152219 IsTypeExpansionSensitive_t isSensitive) {
22162220 RecursiveProperties properties;
22172221 properties.setAddressOnly ();
2222+ auto &patternLowering =
2223+ TC.getTypeLowering (origType.getPackExpansionPatternType (),
2224+ packExpansionType.getPatternType (),
2225+ Expansion);
2226+ properties.addSubobject (patternLowering.getRecursiveProperties ());
22182227 properties = mergeIsTypeExpansionSensitive (isSensitive, properties);
22192228
22202229 return handleAddressOnly (packExpansionType, properties);
0 commit comments