@@ -506,9 +506,8 @@ class ForeignAsyncInitializationPlan final : public ResultPlan {
506506 {
507507 // Allocate space to receive the resume value when the continuation is
508508 // resumed.
509- opaqueResumeType =
510- SGF.getLoweredType (AbstractionPattern (calleeTypeInfo.substResultType ),
511- calleeTypeInfo.substResultType );
509+ opaqueResumeType = SGF.getLoweredType (AbstractionPattern::getOpaque (),
510+ calleeTypeInfo.substResultType );
512511 resumeBuf = SGF.emitTemporaryAllocation (loc, opaqueResumeType);
513512 }
514513
@@ -707,14 +706,12 @@ class ForeignAsyncInitializationPlan final : public ResultPlan {
707706 // The incoming value is the maximally-abstracted result type of the
708707 // continuation. Move it out of the resume buffer and reabstract it if
709708 // necessary.
710- auto resumeResult = SGF.emitLoad (loc, resumeBuf,
711- calleeTypeInfo.origResultType
712- ? *calleeTypeInfo.origResultType
713- : AbstractionPattern (calleeTypeInfo.substResultType ),
714- calleeTypeInfo.substResultType ,
715- SGF.getTypeLowering (calleeTypeInfo.substResultType ),
716- SGFContext (), IsTake);
717-
709+ auto resumeResult =
710+ SGF.emitLoad (loc, resumeBuf, AbstractionPattern::getOpaque (),
711+ calleeTypeInfo.substResultType ,
712+ SGF.getTypeLowering (calleeTypeInfo.substResultType ),
713+ SGFContext (), IsTake);
714+
718715 return RValue (SGF, loc, calleeTypeInfo.substResultType , resumeResult);
719716 }
720717};
0 commit comments