Find a SuspendsExpr's
in a coroutine body statement for early transformation.
More...
Public Member Functions | |
CoroutineASTTransformer (CoroutineASTData &coroutineASTData, size_t &suspendsCounter, Stmt *stmt, llvm::DenseMap< VarDecl *, MemberExpr * > varNamePrefix, Stmt *prev=nullptr) | |
void | Visit (Stmt *stmt) |
void | VisitCompoundStmt (CompoundStmt *stmt) |
void | VisitSwitchStmt (SwitchStmt *stmt) |
void | VisitDoStmt (DoStmt *stmt) |
void | VisitWhileStmt (WhileStmt *stmt) |
void | VisitIfStmt (IfStmt *stmt) |
void | VisitForStmt (ForStmt *stmt) |
void | VisitCXXForRangeStmt (CXXForRangeStmt *stmt) |
void | VisitDeclRefExpr (DeclRefExpr *stmt) |
void | VisitDeclStmt (DeclStmt *stmt) |
void | VisitCXXThisExpr (CXXThisExpr *stmt) |
void | VisitCallExpr (CallExpr *stmt) |
void | VisitCXXMemberCallExpr (CXXMemberCallExpr *stmt) |
void | VisitCoreturnStmt (CoreturnStmt *stmt) |
void | VisitCoyieldExpr (CoyieldExpr *stmt) |
void | VisitCoawaitExpr (CoawaitExpr *stmt) |
void | VisitCoroutineBodyStmt (CoroutineBodyStmt *stmt) |
void | VisitStmt (Stmt *stmt) |
Find a SuspendsExpr's
in a coroutine body statement for early transformation.
Traverse the whole CoroutineBodyStmt to find all appearing VarDecl
. These need to be rerouted to the coroutine frame and hence prefixed by something like __f->. For that reason we only look for VarDecls
directly appearing in the body, CallExpr
will be skipped.
Definition at line 108 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 119 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 136 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 278 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 320 of file CoroutinesCodeGenerator.cpp.
References clang::insights::BuildSuspendVarName(), clang::insights::CORO_FRAME_ACCESS, clang::insights::asthelpers::mkDeclRefExpr(), clang::insights::asthelpers::ReplaceNode(), clang::insights::StrCat(), and clang::insights::asthelpers::Variable().
|
inline |
Definition at line 143 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::mkCompoundStmt(), and clang::insights::asthelpers::ReplaceNode().
|
inline |
Definition at line 302 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 348 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::AccessMember(), clang::insights::AddField(), clang::insights::FindDeclRef(), GetGlobalAST(), clang::insights::GetName(), clang::insights::INITIAL_AWAIT_SUSPEND_CALLED_NAME, clang::insights::CoroutineASTData::mFrameAccessDeclRef, clang::insights::CoroutineASTData::mInitialAwaitResumeCalledAccess, clang::insights::CoroutineASTData::mInitialAwaitResumeCalledField, clang::insights::CoroutineASTData::mPromiseField, clang::insights::CoroutineASTData::mSuspendIndexAccess, clang::insights::CoroutineASTData::mSuspendIndexField, and clang::insights::SUSPEND_INDEX_NAME.
|
inline |
Definition at line 308 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 219 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 290 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 266 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::AccessMember(), kwInternalThis, clang::insights::CoroutineASTData::mFrameAccessDeclRef, clang::insights::CoroutineASTData::mFrameType, clang::insights::asthelpers::mkFieldDecl(), clang::insights::CoroutineASTData::mThisExprs, and clang::insights::asthelpers::ReplaceNode().
|
inline |
Definition at line 228 of file CoroutinesCodeGenerator.cpp.
References clang::insights::Contains(), clang::insights::asthelpers::ReplaceNode(), and RETURN_IF.
|
inline |
Definition at line 239 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::AccessMember(), clang::insights::AddField(), clang::insights::asthelpers::Assign(), clang::insights::GetName(), clang::insights::CoroutineASTData::mFrameAccessDeclRef, and clang::insights::CoroutineASTData::mFrameType.
|
inline |
Definition at line 170 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 193 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::ReplaceNode().
|
inline |
Definition at line 184 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 396 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 163 of file CoroutinesCodeGenerator.cpp.
|
inline |
Definition at line 177 of file CoroutinesCodeGenerator.cpp.