aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-10-26 01:13:38 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-10-26 01:13:38 +0000
commit3dac20a58de62443db0f657870bd62b9c05835e8 (patch)
treee611a01846c2ab939a9c8b7bcecd458af5d7f064
parent9046768d2c7e21a7933c8158664550a866fcdd74 (diff)
Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166746 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGBlocks.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.h b/lib/CodeGen/CGBlocks.h
index 912c21edc8..73fa817380 100644
--- a/lib/CodeGen/CGBlocks.h
+++ b/lib/CodeGen/CGBlocks.h
@@ -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),