summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-08-03 16:12:51 +0000
committerHans Wennborg <hans@hanshq.net>2017-08-03 16:12:51 +0000
commit676729f19a8b81c98a72239633feecdb54ed08cf (patch)
treec1070094979d4d1e3648dbba94cc59c6183b3d6d /include
parentc4d55f5857a1e3a7f41bc75914fd43da30ae6326 (diff)
Merging r308996:
------------------------------------------------------------------------ r308996 | gornishanov | 2017-07-25 11:01:49 -0700 (Tue, 25 Jul 2017) | 9 lines [coroutines] Add serialization/deserialization of coroutines Reviewers: rsmith Reviewed By: rsmith Subscribers: EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D35383 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@309954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/StmtCXX.h5
-rw-r--r--include/clang/Serialization/ASTBitCodes.h9
2 files changed, 12 insertions, 2 deletions
diff --git a/include/clang/AST/StmtCXX.h b/include/clang/AST/StmtCXX.h
index d6c9654fef..77f81838e5 100644
--- a/include/clang/AST/StmtCXX.h
+++ b/include/clang/AST/StmtCXX.h
@@ -317,6 +317,7 @@ class CoroutineBodyStmt final
unsigned NumParams;
friend class ASTStmtReader;
+ friend class ASTReader;
friend TrailingObjects;
Stmt **getStoredStmts() { return getTrailingObjects<Stmt *>(); }
@@ -347,6 +348,8 @@ private:
public:
static CoroutineBodyStmt *Create(const ASTContext &C, CtorArgs const &Args);
+ static CoroutineBodyStmt *Create(const ASTContext &C, EmptyShell,
+ unsigned NumParams);
bool hasDependentPromiseType() const {
return getPromiseDecl()->getType()->isDependentType();
@@ -444,6 +447,8 @@ public:
SubStmts[SubStmt::PromiseCall] = PromiseCall;
}
+ CoreturnStmt(EmptyShell) : CoreturnStmt({}, {}, {}) {}
+
SourceLocation getKeywordLoc() const { return CoreturnLoc; }
/// \brief Retrieve the operand of the 'co_return' statement. Will be nullptr
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h
index 6b40781a12..9227b33d2c 100644
--- a/include/clang/Serialization/ASTBitCodes.h
+++ b/include/clang/Serialization/ASTBitCodes.h
@@ -1545,9 +1545,14 @@ namespace clang {
// ARC
EXPR_OBJC_BRIDGED_CAST, // ObjCBridgedCastExpr
-
+
STMT_MS_DEPENDENT_EXISTS, // MSDependentExistsStmt
- EXPR_LAMBDA // LambdaExpr
+ EXPR_LAMBDA, // LambdaExpr
+ STMT_COROUTINE_BODY,
+ STMT_CORETURN,
+ EXPR_COAWAIT,
+ EXPR_COYIELD,
+ EXPR_DEPENDENT_COAWAIT,
};
/// \brief The kinds of designators that can occur in a