clang API Documentation

Classes | Public Member Functions | Public Attributes
clang::CodeGen::CGBlockInfo Class Reference

CGBlockInfo - Information to generate a block literal. More...

#include <CGBlocks.h>

Collaboration diagram for clang::CodeGen::CGBlockInfo:
Collaboration graph
[legend]

List of all members.

Classes

class  Capture

Public Member Functions

const CapturegetCapture (const VarDecl *var) const
CapturegetCapture (const VarDecl *var)
const BlockDeclgetBlockDecl () const
const BlockExprgetBlockExpr () const
 CGBlockInfo (const BlockDecl *blockDecl, StringRef Name)

Public Attributes

StringRef Name
 Name - The name of the block, kindof.
unsigned CXXThisIndex
 The field index of 'this' within the block, if there is one.
bool CanBeGlobal: 1
bool NeedsCopyDispose: 1
 True if the block needs a custom copy or dispose function.
bool HasCXXObject: 1
bool UsesStret: 1
bool HasCapturedVariableLayout: 1
llvm::DenseMap< const VarDecl
*, Capture
Captures
 The mapping of allocated indexes within the block.
llvm::AllocaInst * Address
llvm::StructType * StructureType
const BlockDeclBlock
const BlockExprBlockExpression
CharUnits BlockSize
CharUnits BlockAlign
CharUnits BlockHeaderForcedGapOffset
CharUnits BlockHeaderForcedGapSize
llvm::Instruction * DominatingIP
CGBlockInfoNextBlockInfo

Detailed Description

CGBlockInfo - Information to generate a block literal.

Definition at line 144 of file CGBlocks.h.


Constructor & Destructor Documentation

CGBlockInfo::CGBlockInfo ( const BlockDecl blockDecl,
StringRef  Name 
)

Definition at line 30 of file CGBlocks.cpp.


Member Function Documentation

const Capture& clang::CodeGen::CGBlockInfo::getCapture ( const VarDecl var) const [inline]

Definition at line 236 of file CGBlocks.h.

References Captures.


Member Data Documentation

Definition at line 208 of file CGBlocks.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitBlockLiteral().

Definition at line 210 of file CGBlocks.h.

Referenced by getBlockDecl(), and getBlockExpr().

Definition at line 218 of file CGBlocks.h.

Referenced by computeBlockInfo().

Definition at line 221 of file CGBlocks.h.

Referenced by computeBlockInfo().

CanBeGlobal - True if the block can be global, i.e. it has no non-constant captures.

Definition at line 188 of file CGBlocks.h.

Referenced by buildGlobalBlock(), computeBlockInfo(), and clang::CodeGen::CodeGenFunction::EmitBlockLiteral().

The mapping of allocated indexes within the block.

Definition at line 206 of file CGBlocks.h.

Referenced by computeBlockInfo(), and getCapture().

An instruction which dominates the full-expression that the block is inside.

Definition at line 225 of file CGBlocks.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitBlockLiteral().

HasCapturedVariableLayout : True if block has captured variables and their layout meta-data has been generated.

Definition at line 203 of file CGBlocks.h.

Referenced by computeBlockInfo(), and clang::CodeGen::CodeGenFunction::EmitBlockLiteral().

HasCXXObject - True if the block's custom copy/dispose functions need to be run even in GC mode.

Definition at line 195 of file CGBlocks.h.

Referenced by computeBlockInfo(), and clang::CodeGen::CodeGenFunction::EmitBlockLiteral().

Name - The name of the block, kindof.

Definition at line 147 of file CGBlocks.h.

True if the block needs a custom copy or dispose function.

Definition at line 191 of file CGBlocks.h.

Referenced by buildBlockDescriptor(), computeBlockInfo(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), and clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable().

The next block in the block-info chain. Invalid if this block info is not part of the CGF's block-info chain, which is true if it corresponds to a global block or a block whose expression has been encountered.

Definition at line 231 of file CGBlocks.h.

Referenced by clang::CodeGen::CodeGenFunction::destroyBlockInfos(), enterBlockScope(), and findAndRemoveBlockInfo().

UsesStret : True if the block uses an stret return. Mutable because it gets set later in the block-creation process.

Definition at line 199 of file CGBlocks.h.

Referenced by buildGlobalBlock(), clang::CodeGen::CodeGenFunction::EmitBlockLiteral(), and clang::CodeGen::CodeGenFunction::GenerateBlockFunction().


The documentation for this class was generated from the following files: