@@ -676,8 +676,13 @@ void ReabstractionInfo::createSubstitutedAndSpecializedTypes() {
676
676
unsigned IdxForResult = 0 ;
677
677
for (SILResultInfo RI : SubstitutedType->getIndirectFormalResults ()) {
678
678
assert (RI.isFormalIndirect ());
679
- if (substConv.getSILType (RI).isLoadable (M) && !RI.getType ()->isVoid () &&
680
- shouldExpand (M, substConv.getSILType (RI).getObjectType ())) {
679
+
680
+ auto ResultTy = substConv.getSILType (RI);
681
+ auto &TL = M.Types .getTypeLowering (ResultTy,
682
+ getResilienceExpansion ());
683
+
684
+ if (TL.isLoadable () && !RI.getType ()->isVoid () &&
685
+ shouldExpand (M, ResultTy)) {
681
686
Conversions.set (IdxForResult);
682
687
break ;
683
688
}
@@ -690,7 +695,12 @@ void ReabstractionInfo::createSubstitutedAndSpecializedTypes() {
690
695
for (SILParameterInfo PI : SubstitutedType->getParameters ()) {
691
696
auto IdxToInsert = IdxForParam;
692
697
++IdxForParam;
693
- if (!substConv.getSILType (PI).isLoadable (M)) {
698
+
699
+ auto ParamTy = substConv.getSILType (PI);
700
+ auto &TL = M.Types .getTypeLowering (ParamTy,
701
+ getResilienceExpansion ());
702
+
703
+ if (!TL.isLoadable ()) {
694
704
continue ;
695
705
}
696
706
@@ -778,9 +788,8 @@ createSpecializedType(CanSILFunctionType SubstFTy, SILModule &M) const {
778
788
if (isFormalResultConverted (IndirectResultIdx++)) {
779
789
// Convert the indirect result to a direct result.
780
790
SILType SILResTy = SILType::getPrimitiveObjectType (RI.getType ());
781
- // FIXME: Expansion
782
791
auto &TL = M.Types .getTypeLowering (SILResTy,
783
- ResilienceExpansion::Minimal );
792
+ getResilienceExpansion () );
784
793
785
794
// Indirect results are passed as owned, so we also need to pass the
786
795
// direct result as owned (except it's a trivial type).
@@ -804,9 +813,8 @@ createSpecializedType(CanSILFunctionType SubstFTy, SILModule &M) const {
804
813
805
814
// Convert the indirect parameter to a direct parameter.
806
815
SILType SILParamTy = SILType::getPrimitiveObjectType (PI.getType ());
807
- // FIXME: Expansion
808
816
auto &TL = M.Types .getTypeLowering (SILParamTy,
809
- ResilienceExpansion::Minimal );
817
+ getResilienceExpansion () );
810
818
811
819
// Indirect parameters are passed as owned/guaranteed, so we also
812
820
// need to pass the direct/guaranteed parameter as
0 commit comments