14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H 15 #define LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H 75 bool empty()
const {
return flags == 0; }
85 return (l.flags & r.flags);
88 return (flags == r.flags);
119 bool empty()
const {
return flags == 0; }
133 return (l.flags & r.flags);
169 bool isIndex()
const {
return (Data & 1) != 0; }
178 return CharUnits::fromQuantity(Offset);
190 assert(isConstant());
201 v.Data = (index << 1) | 1;
203 v.FieldType = FieldType;
209 v.Data =
reinterpret_cast<uintptr_t>(value);
264 return const_cast<CGBlockInfo*
>(
this)->getCapture(var);
267 llvm::DenseMap<const VarDecl*, Capture>::iterator
268 it = Captures.find(var);
269 assert(it != Captures.end() &&
"no entry for variable!");
275 assert(BlockExpression);
277 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)
constexpr XRayInstrMask Function
BlockFlags(uint32_t flags)
Represents a variable declaration or definition.
EHScopeStack::stable_iterator getCleanup() const
Defines the clang::Expr interface and subclasses for C++ expressions.
bool doesNotEscape() const
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 has captures that would necessitate custom copy or dispose helper functions if the ...
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)
Pepresents 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)
bool needsCopyDisposeHelpers() const
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.
const internal::VariadicDynCastAllOfMatcher< Decl, BlockDecl > blockDecl
Matches block declarations.
llvm::Instruction * DominatingIP
An instruction which dominates the full-expression that the block is inside.
void setCleanup(EHScopeStack::stable_iterator cleanup)