Classes | Namespaces | Functions | Variables
CoroutinesCodeGenerator.cpp File Reference
#include <iterator>
#include <optional>
#include <vector>
#include "ASTHelpers.h"
#include "CodeGenerator.h"
#include "DPrint.h"
#include "Insights.h"
#include "InsightsHelpers.h"
#include "NumberIterator.h"
#include <algorithm>
Include dependency graph for CoroutinesCodeGenerator.cpp:

Go to the source code of this file.

Classes

class  clang::insights::CoroutineASTTransformer
 Find a SuspendsExpr's in a coroutine body statement for early transformation. More...
 

Namespaces

 clang
 
 clang::insights
 

Functions

static FieldDecl * clang::insights::AddField (CoroutineASTData &astData, std::string_view name, QualType type)
 
static auto * clang::insights::CreateCoroFunctionDecl (std::string funcName, QualType type)
 
static void clang::insights::SetFunctionBody (FunctionDecl *fd, StmtsContainer &bodyStmts)
 
static std::string clang::insights::BuildSuspendVarName (const OpaqueValueExpr *stmt)
 
static std::optional< std::string > clang::insights::FindValue (llvm::DenseMap< const Expr *, std::pair< const DeclRefExpr *, std::string >> &map, const Expr *key)
 

Variables

constexpr std::string_view clang::insights::CORO_FRAME_NAME {"__f"sv}
 
const std::string clang::insights::CORO_FRAME_ACCESS {StrCat(CORO_FRAME_NAME, "->"sv)}
 
const std::string clang::insights::CORO_FRAME_ACCESS_THIS {StrCat(CORO_FRAME_ACCESS, kwInternalThis)}
 
const std::string clang::insights::SUSPEND_INDEX_NAME {BuildInternalVarName("suspend_index"sv)}
 
const std::string clang::insights::INITIAL_AWAIT_SUSPEND_CALLED_NAME {BuildInternalVarName("initial_await_suspend_called"sv)}
 
const std::string clang::insights::RESUME_LABEL_PREFIX {BuildInternalVarName("resume"sv)}
 
const std::string clang::insights::FINAL_SUSPEND_NAME {BuildInternalVarName("final_suspend"sv)}