14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H 15 #define LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H 74 bool empty()
const {
return flags == 0; }
84 return (l.flags & r.flags);
87 return (flags == r.flags);
118 bool empty()
const {
return flags == 0; }
132 return (l.flags & r.flags);
168 bool isIndex()
const {
return (Data & 1) != 0; }
177 return CharUnits::fromQuantity(Offset);
189 assert(isConstant());
200 v.Data = (index << 1) | 1;
202 v.FieldType = FieldType;
208 v.Data =
reinterpret_cast<uintptr_t>(value);
262 return const_cast<CGBlockInfo*
>(
this)->getCapture(var);
265 llvm::DenseMap<const VarDecl*, Capture>::iterator
266 it = Captures.find(var);
267 assert(it != Captures.end() &&
"no entry for variable!");
273 assert(BlockExpression);
275 return BlockExpression;
const BlockDecl * getBlockDecl() const
Information about the layout of a __block variable.
const Capture & getCapture(const VarDecl *var) const
CharUnits BlockHeaderForcedGapOffset
A (possibly-)qualified type.
Capture & getCapture(const VarDecl *var)
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
C Language Family Type Representation.
friend BlockFieldFlags operator|(BlockFieldFlags l, BlockFieldFlags r)
bool operator==(BlockFlags r)
BlockFlags(uint32_t flags)
VarDecl - An instance of this class is created to represent a variable declaration or definition...
EHScopeStack::stable_iterator getCleanup() const
Defines the clang::Expr interface and subclasses for C++ expressions.
bool HasCapturedVariableLayout
HasCapturedVariableLayout : True if block has captured variables and their layout meta-data has been ...
BlockFlags(BlockByrefFlags flag)
BlockFieldFlags operator|(BlockFieldFlag_t l, BlockFieldFlag_t r)
BlockFieldFlags(BlockFieldFlag_t flag)
CharUnits - This is an opaque type for sizes expressed in character units.
const BlockDecl * getBlockDecl() const
bool HasCXXObject
HasCXXObject - True if the block's custom copy/dispose functions need to be run even in GC mode...
uint32_t getBitMask() const
static Capture makeConstant(llvm::Value *value)
friend BlockFieldFlags & operator|=(BlockFieldFlags &l, BlockFieldFlags r)
StringRef Name
Name - The name of the block, kindof.
bool NeedsCopyDispose
True if the block needs a custom copy or dispose function.
const BlockExpr * BlockExpression
unsigned getIndex() const
uint32_t getBitMask() const
CGBlockInfo - Information to generate a block literal.
QualType fieldType() const
bool CanBeGlobal
CanBeGlobal - True if the block can be global, i.e.
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
BlockFlags(BlockLiteralFlags flag)
CGBlockInfo * NextBlockInfo
The next block in the block-info chain.
DiagnosticLevelMask operator &(DiagnosticLevelMask LHS, DiagnosticLevelMask RHS)
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
CharUnits getOffset() const
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
friend BlockFlags operator|(BlockFlags l, BlockFlags r)
static Capture makeIndex(unsigned index, CharUnits offset, QualType FieldType)
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
bool UsesStret
UsesStret : True if the block uses an stret return.
A saved depth on the scope stack.
llvm::StructType * StructureType
llvm::DenseMap< const VarDecl *, Capture > Captures
The mapping of allocated indexes within the block.
llvm::Value * getConstant() const
const BlockExpr * getBlockExpr() const
unsigned CXXThisIndex
The field index of 'this' within the block, if there is one.
Dataflow Directional Tag Classes.
bool isSpecialPointer() const
Answers whether the flags indicate that this field is an object or block pointer that requires _Block...
friend BlockFlags & operator|=(BlockFlags &l, BlockFlags r)
CharUnits BlockHeaderForcedGapSize
Defines the clang::TargetInfo interface.
llvm::Instruction * DominatingIP
An instruction which dominates the full-expression that the block is inside.
void setCleanup(EHScopeStack::stable_iterator cleanup)