clang  6.0.0svn
Classes | Public Member Functions | Public Attributes | List of all members
clang::CodeGen::CGBlockInfo Class Reference

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

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/CodeGen/CGBlocks.h"

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

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. More...
 
unsigned CXXThisIndex
 The field index of 'this' within the block, if there is one. More...
 
bool CanBeGlobal: 1
 CanBeGlobal - True if the block can be global, i.e. More...
 
bool NeedsCopyDispose: 1
 True if the block needs a custom copy or dispose function. More...
 
bool HasCXXObject: 1
 HasCXXObject - True if the block's custom copy/dispose functions need to be run even in GC mode. More...
 
bool UsesStret: 1
 UsesStret : True if the block uses an stret return. More...
 
bool HasCapturedVariableLayout: 1
 HasCapturedVariableLayout : True if block has captured variables and their layout meta-data has been generated. More...
 
llvm::DenseMap< const VarDecl *, CaptureCaptures
 The mapping of allocated indexes within the block. More...
 
Address LocalAddress
 
llvm::StructType * StructureType
 
const BlockDeclBlock
 
const BlockExprBlockExpression
 
CharUnits BlockSize
 
CharUnits BlockAlign
 
CharUnits CXXThisOffset
 
CharUnits BlockHeaderForcedGapOffset
 
CharUnits BlockHeaderForcedGapSize
 
llvm::Instruction * DominatingIP
 An instruction which dominates the full-expression that the block is inside. More...
 
CGBlockInfoNextBlockInfo
 The next block in the block-info chain. More...
 

Detailed Description

CGBlockInfo - Information to generate a block literal.

Definition at line 149 of file CGBlocks.h.

Constructor & Destructor Documentation

◆ CGBlockInfo()

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

Definition at line 34 of file CGBlocks.cpp.

Referenced by enterBlockScope().

Member Function Documentation

◆ getBlockDecl()

const BlockDecl* clang::CodeGen::CGBlockInfo::getBlockDecl ( ) const
inline

◆ getBlockExpr()

const BlockExpr* clang::CodeGen::CGBlockInfo::getBlockExpr ( ) const
inline

◆ getCapture() [1/2]

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

◆ getCapture() [2/2]

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

Definition at line 264 of file CGBlocks.h.

Member Data Documentation

◆ Block

const BlockDecl* clang::CodeGen::CGBlockInfo::Block

◆ BlockAlign

CharUnits clang::CodeGen::CGBlockInfo::BlockAlign

Definition at line 240 of file CGBlocks.h.

Referenced by buildGlobalBlock(), computeBlockInfo(), and initializeForBlockHeader().

◆ BlockExpression

const BlockExpr* clang::CodeGen::CGBlockInfo::BlockExpression

◆ BlockHeaderForcedGapOffset

CharUnits clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapOffset

Definition at line 246 of file CGBlocks.h.

Referenced by computeBlockInfo(), and GetGCAttrTypeForType().

◆ BlockHeaderForcedGapSize

CharUnits clang::CodeGen::CGBlockInfo::BlockHeaderForcedGapSize

Definition at line 249 of file CGBlocks.h.

Referenced by computeBlockInfo(), and GetGCAttrTypeForType().

◆ BlockSize

CharUnits clang::CodeGen::CGBlockInfo::BlockSize

◆ CanBeGlobal

bool clang::CodeGen::CGBlockInfo::CanBeGlobal

CanBeGlobal - True if the block can be global, i.e.

it has no non-constant captures.

Definition at line 215 of file CGBlocks.h.

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

◆ Captures

llvm::DenseMap<const VarDecl*, Capture> clang::CodeGen::CGBlockInfo::Captures

The mapping of allocated indexes within the block.

Definition at line 233 of file CGBlocks.h.

Referenced by buildBlockDescriptor(), and computeBlockInfo().

◆ CXXThisIndex

unsigned clang::CodeGen::CGBlockInfo::CXXThisIndex

The field index of 'this' within the block, if there is one.

Definition at line 155 of file CGBlocks.h.

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

◆ CXXThisOffset

CharUnits clang::CodeGen::CGBlockInfo::CXXThisOffset

Definition at line 241 of file CGBlocks.h.

Referenced by buildBlockDescriptor().

◆ DominatingIP

llvm::Instruction* clang::CodeGen::CGBlockInfo::DominatingIP

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

Definition at line 253 of file CGBlocks.h.

◆ HasCapturedVariableLayout

bool clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout

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

Definition at line 230 of file CGBlocks.h.

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

◆ HasCXXObject

bool clang::CodeGen::CGBlockInfo::HasCXXObject

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

Definition at line 222 of file CGBlocks.h.

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

◆ LocalAddress

Address clang::CodeGen::CGBlockInfo::LocalAddress

Definition at line 235 of file CGBlocks.h.

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

◆ Name

StringRef clang::CodeGen::CGBlockInfo::Name

Name - The name of the block, kindof.

Definition at line 152 of file CGBlocks.h.

Referenced by clang::CodeGen::CodeGenModule::GetAddrOfGlobalBlock().

◆ NeedsCopyDispose

bool clang::CodeGen::CGBlockInfo::NeedsCopyDispose

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

Definition at line 218 of file CGBlocks.h.

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

◆ NextBlockInfo

CGBlockInfo* clang::CodeGen::CGBlockInfo::NextBlockInfo

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 259 of file CGBlocks.h.

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

◆ StructureType

llvm::StructType* clang::CodeGen::CGBlockInfo::StructureType

◆ UsesStret

bool clang::CodeGen::CGBlockInfo::UsesStret
mutable

UsesStret : True if the block uses an stret return.

Mutable because it gets set later in the block-creation process.

Definition at line 226 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: