@@ -3244,15 +3244,22 @@ class GetAsyncContinuationInstBase
32443244 : public SingleValueInstruction
32453245{
32463246protected:
3247- using SingleValueInstruction::SingleValueInstruction;
3248-
3247+ CanType ResumeType;
3248+ bool Throws;
3249+
3250+ GetAsyncContinuationInstBase (SILInstructionKind Kind, SILDebugLocation Loc,
3251+ SILType ContinuationType, CanType ResumeType,
3252+ bool Throws)
3253+ : SingleValueInstruction(Kind, Loc, ContinuationType),
3254+ ResumeType (ResumeType), Throws(Throws) {}
3255+
32493256public:
32503257 // / Get the type of the value the async task receives on a resume.
3251- CanType getFormalResumeType () const ;
3258+ CanType getFormalResumeType () const { return ResumeType; }
32523259 SILType getLoweredResumeType () const ;
32533260
32543261 // / True if the continuation can be used to resume the task by throwing an error.
3255- bool throws () const ;
3262+ bool throws () const { return Throws; }
32563263
32573264 static bool classof (const SILNode *I) {
32583265 return I->getKind () >= SILNodeKind::First_GetAsyncContinuationInstBase &&
@@ -3268,8 +3275,9 @@ class GetAsyncContinuationInst final
32683275 friend SILBuilder;
32693276
32703277 GetAsyncContinuationInst (SILDebugLocation Loc,
3271- SILType ContinuationTy)
3272- : InstructionBase(Loc, ContinuationTy)
3278+ SILType ContinuationType, CanType ResumeType,
3279+ bool Throws)
3280+ : InstructionBase(Loc, ContinuationType, ResumeType, Throws)
32733281 {}
32743282
32753283public:
@@ -3289,9 +3297,10 @@ class GetAsyncContinuationAddrInst final
32893297{
32903298 friend SILBuilder;
32913299 GetAsyncContinuationAddrInst (SILDebugLocation Loc,
3292- SILValue Operand,
3293- SILType ContinuationTy)
3294- : UnaryInstructionBase(Loc, Operand, ContinuationTy)
3300+ SILValue ResumeBuf,
3301+ SILType ContinuationType, CanType ResumeType,
3302+ bool Throws)
3303+ : UnaryInstructionBase(Loc, ResumeBuf, ContinuationType, ResumeType, Throws)
32953304 {}
32963305};
32973306
0 commit comments