13 #ifndef LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H 14 #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);
135 return flags == Other.flags;
171 bool isIndex()
const {
return (Data & 1) != 0; }
180 return CharUnits::fromQuantity(Offset);
192 assert(isConstant());
203 v.Data = (index << 1) | 1;
205 v.FieldType = FieldType;
211 v.Data =
reinterpret_cast<uintptr_t>(value);
271 return const_cast<CGBlockInfo*
>(
this)->getCapture(var);
274 llvm::DenseMap<const VarDecl*, Capture>::iterator
275 it = Captures.find(var);
276 assert(it != Captures.end() &&
"no entry for variable!");
282 assert(BlockExpression);
284 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)
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
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)
Represents a block literal declaration, which is like an unnamed FunctionDecl.
CharUnits getOffset() const
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
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)
bool UsesStret
UsesStret : True if the block uses an stret return.
A saved depth on the scope stack.
llvm::StructType * StructureType
bool CapturesNonExternalType
Indicates whether an object of a non-external C++ class is captured.
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
bool operator==(BlockFieldFlags Other) const
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)