clang
3.9.0
|
This captures a statement into a function. More...
#include <Stmt.h>
Classes | |
class | Capture |
Describes the capture of either a variable, or 'this', or variable-length array type. More... | |
Public Types | |
enum | VariableCaptureKind { VCK_This, VCK_ByRef, VCK_ByCopy, VCK_VLAType } |
The different capture forms: by 'this', by reference, capture for variable-length array type etc. More... | |
typedef Capture * | capture_iterator |
An iterator that walks over the captures. More... | |
typedef const Capture * | const_capture_iterator |
typedef llvm::iterator_range < capture_iterator > | capture_range |
typedef llvm::iterator_range < const_capture_iterator > | capture_const_range |
typedef Expr ** | capture_init_iterator |
Iterator that walks over the capture initialization arguments. More... | |
typedef llvm::iterator_range < capture_init_iterator > | capture_init_range |
typedef Expr *const * | const_capture_init_iterator |
Const iterator that walks over the capture initialization arguments. More... | |
typedef llvm::iterator_range < const_capture_init_iterator > | const_capture_init_range |
Public Member Functions | |
Stmt * | getCapturedStmt () |
Retrieve the statement being captured. More... | |
const Stmt * | getCapturedStmt () const |
CapturedDecl * | getCapturedDecl () |
Retrieve the outlined function declaration. More... | |
const CapturedDecl * | getCapturedDecl () const |
void | setCapturedDecl (CapturedDecl *D) |
Set the outlined function declaration. More... | |
CapturedRegionKind | getCapturedRegionKind () const |
Retrieve the captured region kind. More... | |
void | setCapturedRegionKind (CapturedRegionKind Kind) |
Set the captured region kind. More... | |
const RecordDecl * | getCapturedRecordDecl () const |
Retrieve the record declaration for captured variables. More... | |
void | setCapturedRecordDecl (RecordDecl *D) |
Set the record declaration for captured variables. More... | |
bool | capturesVariable (const VarDecl *Var) const |
True if this variable has been captured. More... | |
capture_range | captures () |
capture_const_range | captures () const |
capture_iterator | capture_begin () |
Retrieve an iterator pointing to the first capture. More... | |
const_capture_iterator | capture_begin () const |
capture_iterator | capture_end () const |
Retrieve an iterator pointing past the end of the sequence of captures. More... | |
unsigned | capture_size () const |
Retrieve the number of captures, including 'this'. More... | |
capture_init_range | capture_inits () |
const_capture_init_range | capture_inits () const |
capture_init_iterator | capture_init_begin () |
Retrieve the first initialization argument. More... | |
const_capture_init_iterator | capture_init_begin () const |
capture_init_iterator | capture_init_end () |
Retrieve the iterator pointing one past the last initialization argument. More... | |
const_capture_init_iterator | capture_init_end () const |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceRange | getSourceRange () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static CapturedStmt * | Create (const ASTContext &Context, Stmt *S, CapturedRegionKind Kind, ArrayRef< Capture > Captures, ArrayRef< Expr * > CaptureInits, CapturedDecl *CD, RecordDecl *RD) |
static CapturedStmt * | CreateDeserialized (const ASTContext &Context, unsigned NumCaptures) |
static bool | classof (const Stmt *T) |
Friends | |
class | ASTStmtReader |
This captures a statement into a function.
For example, the following pragma annotated compound statement can be represented as a CapturedStmt, and this compound statement is the body of an anonymous outlined function.
typedef llvm::iterator_range<const_capture_iterator> clang::CapturedStmt::capture_const_range |
typedef llvm::iterator_range<capture_init_iterator> clang::CapturedStmt::capture_init_range |
typedef llvm::iterator_range<capture_iterator> clang::CapturedStmt::capture_range |
typedef Expr* const* clang::CapturedStmt::const_capture_init_iterator |
typedef llvm::iterator_range<const_capture_init_iterator> clang::CapturedStmt::const_capture_init_range |
typedef const Capture* clang::CapturedStmt::const_capture_iterator |
|
inline |
Retrieve an iterator pointing to the first capture.
Definition at line 2148 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::CGCapturedStmtInfo().
|
inline |
|
inline |
Retrieve an iterator pointing past the end of the sequence of captures.
Definition at line 2153 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::CGCapturedStmtInfo().
|
inline |
Retrieve the first initialization argument.
Definition at line 2179 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), and clang::CodeGen::CodeGenFunction::InitCapturedStruct().
|
inline |
|
inline |
Retrieve the iterator pointing one past the last initialization argument.
Definition at line 2189 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), and clang::CodeGen::CodeGenFunction::InitCapturedStruct().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 2140 of file Stmt.h.
Referenced by capturesVariable(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars().
|
inline |
True if this variable has been captured.
Definition at line 1107 of file Stmt.cpp.
References captures(), and I.
Referenced by clang::CapturedStmt::Capture::getCapturedVar().
|
static |
Definition at line 1038 of file Stmt.cpp.
References clang::ASTContext::Allocate().
Referenced by clang::Sema::ActOnCapturedRegionEnd().
|
static |
Definition at line 1066 of file Stmt.cpp.
References clang::ASTContext::Allocate().
CapturedDecl * CapturedStmt::getCapturedDecl | ( | ) |
Retrieve the outlined function declaration.
Definition at line 1084 of file Stmt.cpp.
Referenced by clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPParallelDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetDirective(), clang::Sema::ActOnOpenMPTargetParallelDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTaskDirective(), clang::Sema::ActOnOpenMPTeamsDirective(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
const CapturedDecl * CapturedStmt::getCapturedDecl | ( | ) | const |
|
inline |
Retrieve the record declaration for captured variables.
Definition at line 2123 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::CGCapturedStmtInfo(), clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), and clang::CodeGen::CodeGenFunction::InitCapturedStruct().
CapturedRegionKind CapturedStmt::getCapturedRegionKind | ( | ) | const |
Retrieve the captured region kind.
Definition at line 1098 of file Stmt.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitStmt().
|
inline |
Retrieve the statement being captured.
Definition at line 2106 of file Stmt.h.
Referenced by clang::Sema::ActOnCapturedRegionEnd(), emitNumTeamsClauseForTargetDirective(), and emitThreadLimitClauseForTargetDirective().
|
inline |
|
inline |
|
inline |
Definition at line 2197 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunction().
|
inline |
void CapturedStmt::setCapturedDecl | ( | CapturedDecl * | D | ) |
|
inline |
void CapturedStmt::setCapturedRegionKind | ( | CapturedRegionKind | Kind | ) |
|
friend |