@@ -353,8 +353,8 @@ ManagedValue SILGenFunction::emitFuncToBlock(SILLocation loc,
353
353
// thunks, which is what we are in spirit.
354
354
auto thunk = SGM.getOrCreateReabstractionThunk (F.getContextGenericParams (),
355
355
invokeTy,
356
- fnInterfaceTy ,
357
- blockInterfaceTy ,
356
+ fnTy ,
357
+ blockTy ,
358
358
F.isFragile ());
359
359
360
360
// Build it if necessary.
@@ -772,7 +772,7 @@ static SILFunctionType *emitObjCThunkArguments(SILGenFunction &gen,
772
772
// Emit the indirect result arguments, if any.
773
773
// FIXME: we're just assuming that these match up exactly?
774
774
for (auto indirectResult : objcFnTy->getIndirectResults ()) {
775
- SILType argTy = gen. F . mapTypeIntoContext ( indirectResult.getSILType () );
775
+ SILType argTy = indirectResult.getSILType ();
776
776
auto arg = new (gen.F .getModule ()) SILArgument (gen.F .begin (), argTy);
777
777
args.push_back (arg);
778
778
}
@@ -783,7 +783,7 @@ static SILFunctionType *emitObjCThunkArguments(SILGenFunction &gen,
783
783
assert (inputs.size () ==
784
784
nativeInputs.size () + unsigned (foreignError.hasValue ()));
785
785
for (unsigned i = 0 , e = inputs.size (); i < e; ++i) {
786
- SILType argTy = gen. F . mapTypeIntoContext ( inputs[i].getSILType () );
786
+ SILType argTy = inputs[i].getSILType ();
787
787
SILValue arg = new (gen.F .getModule ()) SILArgument (gen.F .begin (), argTy);
788
788
789
789
// If this parameter is the foreign error slot, pull it out.
@@ -832,8 +832,7 @@ static SILFunctionType *emitObjCThunkArguments(SILGenFunction &gen,
832
832
Scope scope (gen.Cleanups , CleanupLocation::get (loc));
833
833
assert (bridgedArgs.size () == nativeInputs.size ());
834
834
for (unsigned i = 0 , size = bridgedArgs.size (); i < size; ++i) {
835
- SILType argTy = gen.F .mapTypeIntoContext (
836
- swiftFnTy->getParameters ()[i].getSILType ());
835
+ SILType argTy = swiftFnTy->getParameters ()[i].getSILType ();
837
836
ManagedValue native =
838
837
gen.emitBridgedToNativeValue (loc,
839
838
bridgedArgs[i],
@@ -869,8 +868,7 @@ void SILGenFunction::emitNativeToForeignThunk(SILDeclRef thunk) {
869
868
auto nativeInfo = getConstantInfo (native);
870
869
auto swiftResultTy =
871
870
F.mapTypeIntoContext (nativeInfo.SILFnType ->getSILResult ());
872
- auto objcResultTy =
873
- F.mapTypeIntoContext (objcFnTy->getSILResult ());
871
+ auto objcResultTy = objcFnTy->getSILResult ();
874
872
875
873
// Call the native entry point.
876
874
SILValue nativeFn = emitGlobalFunctionRef (loc, native, nativeInfo);
0 commit comments