@@ -4123,16 +4123,18 @@ class CoroutineSuspendExpr : public Expr {
4123
4123
4124
4124
enum SubExpr { Common, Ready, Suspend, Resume, Count };
4125
4125
Stmt *SubExprs[SubExpr::Count];
4126
+ OpaqueValueExpr *OpaqueValue = nullptr ;
4126
4127
4127
4128
friend class ASTStmtReader ;
4128
4129
public:
4129
4130
CoroutineSuspendExpr (StmtClass SC, SourceLocation KeywordLoc, Expr *Common,
4130
- Expr *Ready, Expr *Suspend, Expr *Resume)
4131
+ Expr *Ready, Expr *Suspend, Expr *Resume,
4132
+ OpaqueValueExpr *OpaqueValue)
4131
4133
: Expr(SC, Resume->getType (), Resume->getValueKind(),
4132
4134
Resume->getObjectKind(), Resume->isTypeDependent(),
4133
4135
Resume->isValueDependent(), Common->isInstantiationDependent(),
4134
4136
Common->containsUnexpandedParameterPack()),
4135
- KeywordLoc(KeywordLoc) {
4137
+ KeywordLoc(KeywordLoc), OpaqueValue(OpaqueValue) {
4136
4138
SubExprs[SubExpr::Common] = Common;
4137
4139
SubExprs[SubExpr::Ready] = Ready;
4138
4140
SubExprs[SubExpr::Suspend] = Suspend;
@@ -4161,6 +4163,8 @@ class CoroutineSuspendExpr : public Expr {
4161
4163
Expr *getCommonExpr () const {
4162
4164
return static_cast <Expr*>(SubExprs[SubExpr::Common]);
4163
4165
}
4166
+ // / \brief getOpaqueValue - Return the opaque value placeholder.
4167
+ OpaqueValueExpr *getOpaqueValue () const { return OpaqueValue; }
4164
4168
4165
4169
Expr *getReadyExpr () const {
4166
4170
return static_cast <Expr*>(SubExprs[SubExpr::Ready]);
@@ -4194,10 +4198,11 @@ class CoawaitExpr : public CoroutineSuspendExpr {
4194
4198
friend class ASTStmtReader ;
4195
4199
public:
4196
4200
CoawaitExpr (SourceLocation CoawaitLoc, Expr *Operand, Expr *Ready,
4197
- Expr *Suspend, Expr *Resume, bool IsImplicit = false )
4201
+ Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue,
4202
+ bool IsImplicit = false )
4198
4203
: CoroutineSuspendExpr(CoawaitExprClass, CoawaitLoc, Operand, Ready,
4199
- Suspend, Resume) {
4200
- CoawaitBits.IsImplicit = IsImplicit;
4204
+ Suspend, Resume, OpaqueValue ) {
4205
+ CoawaitBits.IsImplicit = IsImplicit;
4201
4206
}
4202
4207
CoawaitExpr (SourceLocation CoawaitLoc, QualType Ty, Expr *Operand,
4203
4208
bool IsImplicit = false )
@@ -4270,9 +4275,9 @@ class CoyieldExpr : public CoroutineSuspendExpr {
4270
4275
friend class ASTStmtReader ;
4271
4276
public:
4272
4277
CoyieldExpr (SourceLocation CoyieldLoc, Expr *Operand, Expr *Ready,
4273
- Expr *Suspend, Expr *Resume)
4278
+ Expr *Suspend, Expr *Resume, OpaqueValueExpr *OpaqueValue )
4274
4279
: CoroutineSuspendExpr(CoyieldExprClass, CoyieldLoc, Operand, Ready,
4275
- Suspend, Resume) {}
4280
+ Suspend, Resume, OpaqueValue ) {}
4276
4281
CoyieldExpr (SourceLocation CoyieldLoc, QualType Ty, Expr *Operand)
4277
4282
: CoroutineSuspendExpr(CoyieldExprClass, CoyieldLoc, Ty, Operand) {}
4278
4283
CoyieldExpr (EmptyShell Empty)
0 commit comments