@@ -375,12 +375,14 @@ static bool modResultType(SILFunction *F, irgen::IRGenModule &Mod,
375
375
static bool shouldTransformYields (GenericEnvironment *genEnv,
376
376
CanSILFunctionType loweredTy,
377
377
irgen::IRGenModule &Mod,
378
- LargeSILTypeMapper &Mapper) {
378
+ LargeSILTypeMapper &Mapper,
379
+ TypeExpansionContext expansion) {
379
380
if (!modifiableFunction (loweredTy)) {
380
381
return false ;
381
382
}
382
383
for (auto &yield : loweredTy->getYields ()) {
383
- auto yieldStorageType = yield.getSILStorageInterfaceType ();
384
+ auto yieldStorageType = yield.getSILStorageType (Mod.getSILModule (),
385
+ loweredTy, expansion);
384
386
auto newYieldStorageType =
385
387
Mapper.getNewSILType (genEnv, yieldStorageType, Mod);
386
388
if (yieldStorageType != newYieldStorageType)
@@ -394,7 +396,8 @@ static bool modYieldType(SILFunction *F, irgen::IRGenModule &Mod,
394
396
GenericEnvironment *genEnv = getSubstGenericEnvironment (F);
395
397
auto loweredTy = F->getLoweredFunctionType ();
396
398
397
- return shouldTransformYields (genEnv, loweredTy, Mod, Mapper);
399
+ return shouldTransformYields (genEnv, loweredTy, Mod, Mapper,
400
+ F->getTypeExpansionContext ());
398
401
}
399
402
400
403
SILParameterInfo LargeSILTypeMapper::getNewParameter (GenericEnvironment *env,
0 commit comments