]> granicus.if.org Git - clang/commitdiff
Declare type of flags to be used in a __block (byref)
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 26 Oct 2012 01:13:38 +0000 (01:13 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 26 Oct 2012 01:13:38 +0000 (01:13 +0000)
variable descriptor captured by a block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166746 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.h

index 912c21edc8d566d6a11caa5d382c66e4a9524536..73fa81738079869c244815d6f0bf92c6324dfafa 100644 (file)
@@ -47,6 +47,18 @@ namespace CodeGen {
 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),