14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H
15 #define LLVM_CLANG_LIB_CODEGEN_CGBLOCKS_H
28 #include "llvm/IR/Module.h"
78 bool empty()
const {
return flags == 0; }
88 return (l.flags & r.flags);
91 return (flags == r.flags);
122 bool empty()
const {
return flags == 0; }
136 return (l.flags & r.flags);
157 bool isIndex()
const {
return (Data & 1) != 0; }
175 v.Data = (index << 1) | 1;
181 v.Data =
reinterpret_cast<uintptr_t
>(value);
237 llvm::DenseMap<const VarDecl*, Capture>::iterator
239 assert(it !=
Captures.end() &&
"no entry for variable!");
CharUnits BlockHeaderForcedGapOffset
Capture & getCapture(const VarDecl *var)
BlockFlags operator|(BlockLiteralFlags l, BlockLiteralFlags r)
static Capture makeIndex(unsigned index)
friend BlockFieldFlags operator|(BlockFieldFlags l, BlockFieldFlags r)
bool operator==(BlockFlags r)
BlockFlags(uint32_t flags)
uint32_t getBitMask() const
CGBlockInfo(const BlockDecl *blockDecl, StringRef Name)
Defines the clang::Expr interface and subclasses for C++ expressions.
bool HasCapturedVariableLayout
BlockFlags(BlockByrefFlags flag)
friend bool operator&(BlockFieldFlags l, BlockFieldFlags r)
const Capture & getCapture(const VarDecl *var) const
BlockFieldFlags(BlockFieldFlag_t flag)
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
CGBlockInfo - Information to generate a block literal.
BlockFlags(BlockLiteralFlags flag)
CGBlockInfo * NextBlockInfo
bool isSpecialPointer() const
unsigned getIndex() const
friend BlockFlags operator|(BlockFlags l, BlockFlags r)
EHScopeStack::stable_iterator getCleanup() const
llvm::StructType * StructureType
llvm::DenseMap< const VarDecl *, Capture > Captures
The mapping of allocated indexes within the block.
unsigned CXXThisIndex
The field index of 'this' within the block, if there is one.
const BlockDecl * getBlockDecl() const
llvm::AllocaInst * Address
llvm::Value * getConstant() const
friend BlockFlags & operator|=(BlockFlags &l, BlockFlags r)
friend bool operator&(BlockFlags l, BlockFlags r)
uint32_t getBitMask() const
const BlockDecl * getBlockDecl() const
CharUnits BlockHeaderForcedGapSize
Defines the clang::TargetInfo interface.
const BlockExpr * getBlockExpr() const
llvm::Instruction * DominatingIP
void setCleanup(EHScopeStack::stable_iterator cleanup)