@@ -3244,15 +3244,22 @@ class GetAsyncContinuationInstBase
3244
3244
: public SingleValueInstruction
3245
3245
{
3246
3246
protected:
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
+
3249
3256
public:
3250
3257
// / Get the type of the value the async task receives on a resume.
3251
- CanType getFormalResumeType () const ;
3258
+ CanType getFormalResumeType () const { return ResumeType; }
3252
3259
SILType getLoweredResumeType () const ;
3253
3260
3254
3261
// / 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; }
3256
3263
3257
3264
static bool classof (const SILNode *I) {
3258
3265
return I->getKind () >= SILNodeKind::First_GetAsyncContinuationInstBase &&
@@ -3268,8 +3275,9 @@ class GetAsyncContinuationInst final
3268
3275
friend SILBuilder;
3269
3276
3270
3277
GetAsyncContinuationInst (SILDebugLocation Loc,
3271
- SILType ContinuationTy)
3272
- : InstructionBase(Loc, ContinuationTy)
3278
+ SILType ContinuationType, CanType ResumeType,
3279
+ bool Throws)
3280
+ : InstructionBase(Loc, ContinuationType, ResumeType, Throws)
3273
3281
{}
3274
3282
3275
3283
public:
@@ -3289,9 +3297,10 @@ class GetAsyncContinuationAddrInst final
3289
3297
{
3290
3298
friend SILBuilder;
3291
3299
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)
3295
3304
{}
3296
3305
};
3297
3306
0 commit comments