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.
References Visit().
|
inline |
Definition at line 136 of file CoroutinesCodeGenerator.cpp.
Referenced by CoroutineASTTransformer(), VisitCallExpr(), VisitCoawaitExpr(), VisitCompoundStmt(), VisitCoreturnStmt(), VisitCoroutineBodyStmt(), VisitCoyieldExpr(), VisitCXXForRangeStmt(), VisitCXXMemberCallExpr(), VisitDeclStmt(), VisitDoStmt(), VisitForStmt(), VisitIfStmt(), VisitStmt(), VisitSwitchStmt(), and VisitWhileStmt().
|
inline |
Definition at line 283 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 325 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::StmtsContainer::Add(), clang::insights::BuildSuspendVarName(), clang::insights::CORO_FRAME_ACCESS, clang::insights::asthelpers::mkDeclRefExpr(), clang::insights::asthelpers::ReplaceNode(), clang::insights::StrCat(), clang::insights::asthelpers::Variable(), and Visit().
|
inline |
Definition at line 143 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::StmtsContainer::Add(), clang::insights::asthelpers::StmtsContainer::clear(), clang::insights::FINAL_SUSPEND_NAME, clang::insights::asthelpers::Goto(), clang::insights::asthelpers::mkCompoundStmt(), clang::insights::asthelpers::ReplaceNode(), and Visit().
|
inline |
Definition at line 307 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 353 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, clang::insights::SUSPEND_INDEX_NAME, and Visit().
|
inline |
Definition at line 313 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::StmtsContainer::Add(), and Visit().
|
inline |
Definition at line 224 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 295 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 271 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 233 of file CoroutinesCodeGenerator.cpp.
References clang::insights::Contains(), clang::insights::asthelpers::ReplaceNode(), and RETURN_IF.
|
inline |
Definition at line 244 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::AccessMember(), clang::insights::asthelpers::StmtsContainer::Add(), clang::insights::AddField(), clang::insights::asthelpers::Assign(), clang::insights::GetName(), clang::insights::CoroutineASTData::mFrameAccessDeclRef, clang::insights::CoroutineASTData::mFrameType, and Visit().
|
inline |
Definition at line 175 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 198 of file CoroutinesCodeGenerator.cpp.
References clang::insights::asthelpers::StmtsContainer::mStmts, clang::insights::asthelpers::ReplaceNode(), and Visit().
|
inline |
Definition at line 189 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 401 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 168 of file CoroutinesCodeGenerator.cpp.
References Visit().
|
inline |
Definition at line 182 of file CoroutinesCodeGenerator.cpp.
References Visit().