[cfe-commits] r166746 - /cfe/trunk/lib/CodeGen/CGBlocks.h

Fariborz Jahanian fjahanian at apple.com
Thu Oct 25 18:13:39 PDT 2012


Author: fjahanian
Date: Thu Oct 25 20:13:38 2012
New Revision: 166746

URL: http://llvm.org/viewvc/llvm-project?rev=166746&view=rev
Log:
Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.


Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.h

Modified: cfe/trunk/lib/CodeGen/CGBlocks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.h?rev=166746&r1=166745&r2=166746&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.h (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.h Thu Oct 25 20:13:38 2012
@@ -47,6 +47,18 @@
 class CodeGenModule;
 class CGBlockInfo;
 
+// Flags stored in __block variables.
+enum BlockByrefFlags {
+  BLOCK_BYREF_HAS_COPY_DISPOSE         = (1   << 25), // compiler
+  BLOCK_BYREF_LAYOUT_MASK              = (0xF << 28), // compiler
+  BLOCK_BYREF_LAYOUT_EXTENDED          = (1   << 28),
+  BLOCK_BYREF_LAYOUT_NON_OBJECT        = (2   << 28),
+  BLOCK_BYREF_LAYOUT_STRONG            = (3   << 28),
+  BLOCK_BYREF_LAYOUT_BYREF             = (4   << 28),
+  BLOCK_BYREF_LAYOUT_WEAK              = (5   << 28),
+  BLOCK_BYREF_LAYOUT_UNRETAINED        = (6   << 28)
+};
+
 enum BlockLiteralFlags {
   BLOCK_HAS_COPY_DISPOSE =  (1 << 25),
   BLOCK_HAS_CXX_OBJ =       (1 << 26),





More information about the cfe-commits mailing list