diff options
Diffstat (limited to 'lib/CodeGen/CGBlocks.h')
-rw-r--r-- | lib/CodeGen/CGBlocks.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.h b/lib/CodeGen/CGBlocks.h index 5abf82b3f6e11..3f9fc16d9b101 100644 --- a/lib/CodeGen/CGBlocks.h +++ b/lib/CodeGen/CGBlocks.h @@ -60,7 +60,7 @@ enum BlockLiteralFlags { BLOCK_IS_GLOBAL = (1 << 28), BLOCK_USE_STRET = (1 << 29), BLOCK_HAS_SIGNATURE = (1 << 30), - BLOCK_HAS_EXTENDED_LAYOUT = (1 << 31) + BLOCK_HAS_EXTENDED_LAYOUT = (1u << 31) }; class BlockFlags { uint32_t flags; @@ -132,6 +132,9 @@ public: friend bool operator&(BlockFieldFlags l, BlockFieldFlags r) { return (l.flags & r.flags); } + bool operator==(BlockFieldFlags Other) const { + return flags == Other.flags; + } }; inline BlockFieldFlags operator|(BlockFieldFlag_t l, BlockFieldFlag_t r) { return BlockFieldFlags(l) | BlockFieldFlags(r); @@ -231,6 +234,11 @@ public: /// and their layout meta-data has been generated. bool HasCapturedVariableLayout : 1; + /// Indicates whether an object of a non-external C++ class is captured. This + /// bit is used to determine the linkage of the block copy/destroy helper + /// functions. + bool CapturesNonExternalType : 1; + /// The mapping of allocated indexes within the block. llvm::DenseMap<const VarDecl*, Capture> Captures; |