clang 10.0.0git

Classes | Enumerations | Functions
CGCoroutine.cpp File Reference
`#include "CGCleanup.h"`
`#include "CodeGenFunction.h"`
`#include "llvm/ADT/ScopeExit.h"`
`#include "clang/AST/StmtCXX.h"`
`#include "clang/AST/StmtVisitor.h"`
Include dependency graph for CGCoroutine.cpp:

Go to the source code of this file.

## Classes
struct | clang::CodeGen::CGCoroData

## Enumerations
enum | AwaitKind

## Functions
static void | createCoroData (CodeGenFunction &CGF, CodeGenFunction::CGCoroInfo &CurCoro, llvm::CallInst *CoroId, CallExpr const *CoroIdExpr=nullptr)
static SmallString< 32 > | buildSuspendPrefixStr (CGCoroData &Coro, AwaitKind Kind)
static bool | memberCallExpressionCanThrow (const Expr *E)
static LValueOrRValue | emitSuspendExpression (CodeGenFunction &CGF, CGCoroData &Coro, CoroutineSuspendExpr const &S, AwaitKind Kind, AggValueSlot aggSlot, bool ignoreResult, bool forLValue)
static QualType | getCoroutineSuspendExprReturnType (const ASTContext &Ctx, const CoroutineSuspendExpr *E)
static SmallVector< llvm::OperandBundleDef, 1 > | getBundlesForCoroEnd (CodeGenFunction &CGF)
static void | emitBodyAndFallthrough (CodeGenFunction &CGF, const CoroutineBodyStmt &S, Stmt *Body)

## Enumeration Type Documentation

## ◆ AwaitKind

enum AwaitKind
| strong

Definition at line 26 of file CGCoroutine.cpp.

## Function Documentation

## ◆ buildSuspendPrefixStr()

static SmallString<32> buildSuspendPrefixStr | ( | CGCoroData & | Coro,
|  | AwaitKind | Kind
| ) |  |
| static

Definition at line 112 of file CGCoroutine.cpp.

References clang::CodeGen::CGCoroData::AwaitNum, No, clang::Normal, and clang::CodeGen::CGCoroData::YieldNum.

## ◆ createCoroData()

static void createCoroData | ( | CodeGenFunction & | CGF,
|  | CodeGenFunction::CGCoroInfo & | CurCoro,
|  | llvm::CallInst * | CoroId,
|  | CallExpr const * | CoroIdExpr = `nullptr`
| ) |  |
| static

Definition at line 89 of file CGCoroutine.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, and clang::CodeGen::CodeGenModule::Error().

## ◆ emitBodyAndFallthrough()

static void emitBodyAndFallthrough | ( | CodeGenFunction & | CGF,
|  | const CoroutineBodyStmt & | S,
|  | Stmt * | Body
| ) |  |
| static

Definition at line 534 of file CGCoroutine.cpp.

## ◆ emitSuspendExpression()

static LValueOrRValue emitSuspendExpression | ( | CodeGenFunction & | CGF,
|  | CGCoroData & | Coro,
|  | CoroutineSuspendExpr const & | S,
|  | AwaitKind | Kind,
|  | AggValueSlot | aggSlot,
|  | bool | ignoreResult,
|  | bool | forLValue
| ) |  |
| static

Definition at line 175 of file CGCoroutine.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitCoawaitExpr(), clang::CodeGen::CodeGenFunction::EmitCoawaitLValue(), clang::CodeGen::CodeGenFunction::EmitCoyieldExpr(), and clang::CodeGen::CodeGenFunction::EmitCoyieldLValue().

## ◆ getBundlesForCoroEnd()

static SmallVector<llvm::OperandBundleDef, 1> getBundlesForCoroEnd | ( | CodeGenFunction & | CGF | ) |
| static

Definition at line 383 of file CGCoroutine.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurCoro, clang::CodeGen::CodeGenFunction::CurrentFuncletPad, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenFunction::getEHResumeBlock(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

## ◆ getCoroutineSuspendExprReturnType()

static QualType getCoroutineSuspendExprReturnType | ( | const ASTContext & | Ctx,
|  | const CoroutineSuspendExpr * | E
| ) |  |
| static

Definition at line 290 of file CGCoroutine.cpp.

References clang::CoroutineSuspendExpr::getResumeExpr().

Referenced by clang::CodeGen::CodeGenFunction::EmitCoawaitLValue(), and clang::CodeGen::CodeGenFunction::EmitCoyieldLValue().

## ◆ memberCallExpressionCanThrow()

static bool memberCallExpressionCanThrow | ( | const Expr * | E | ) |
| static

Definition at line 132 of file CGCoroutine.cpp.

References clang::CT_Cannot, and clang::isNoexceptExceptionSpec().