Commit e14f98e0 authored by Fariborz Jahanian's avatar Fariborz Jahanian
Browse files

objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.

lower 24bit is currently being used.

llvm-svn: 167678
parent 44a3d901
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -59,12 +59,12 @@ enum BlockByrefFlags {
};

enum BlockLiteralFlags {
  BLOCK_HAS_EXTENDED_LAYOUT = (1 << 23),
  BLOCK_HAS_COPY_DISPOSE =  (1 << 25),
  BLOCK_HAS_CXX_OBJ =       (1 << 26),
  BLOCK_IS_GLOBAL =         (1 << 28),
  BLOCK_USE_STRET =         (1 << 29),
  BLOCK_HAS_SIGNATURE  =    (1 << 30)
  BLOCK_HAS_SIGNATURE  =    (1 << 30),
  BLOCK_HAS_EXTENDED_LAYOUT = (1 << 31)
};
class BlockFlags {
  uint32_t flags;
+4 −4
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ void test4(void) {
  // CHECK-NEXT: store i8* [[T1]], i8** [[SLOT]]
  // CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]]* [[VAR]], i32 0, i32 6
  // 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
  // CHECK:      store i32 1115684864,
  // CHECK:      store i32 -1040187392,
  // CHECK:      [[T0:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
  // CHECK-NEXT: store i8* [[T0]], i8**
  // CHECK:      call void @test4_helper(
@@ -171,7 +171,7 @@ void test5(void) {
  // CHECK-NEXT: store i8* [[T1]], i8** [[VAR]],
  // CHECK-NEXT: call void @objc_release(i8* [[T1]])
  // 0x40800000 - has signature but no copy/dispose, as well as BLOCK_HAS_EXTENDED_LAYOUT
  // CHECK:      store i32 1082130432, i32*
  // CHECK:      store i32 -1073741824, i32*
  // CHECK:      [[CAPTURE:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
  // CHECK-NEXT: [[T0:%.*]] = load i8** [[VAR]]
  // CHECK-NEXT: store i8* [[T0]], i8** [[CAPTURE]]
@@ -199,7 +199,7 @@ void test6(void) {
  // CHECK-NEXT: call void @objc_release(i8* [[T1]])
  // CHECK-NEXT: [[SLOT:%.*]] = getelementptr inbounds [[BYREF_T]]* [[VAR]], i32 0, i32 6
  // 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
  // CHECK:      store i32 1115684864,
  // CHECK:      store i32 -1040187392,
  // CHECK:      [[T0:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
  // CHECK-NEXT: store i8* [[T0]], i8**
  // CHECK:      call void @test6_helper(
@@ -248,7 +248,7 @@ void test7(void) {
  // CHECK-NEXT: call i8* @objc_initWeak(i8** [[VAR]], i8* [[T1]])
  // CHECK-NEXT: call void @objc_release(i8* [[T1]])
  // 0x42800000 - has signature, copy/dispose helpers, as well as BLOCK_HAS_EXTENDED_LAYOUT
  // CHECK:      store i32 1115684864,
  // CHECK:      store i32 -1040187392,
  // CHECK:      [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
  // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_loadWeak(i8** [[VAR]])
  // CHECK-NEXT: call i8* @objc_initWeak(i8** [[SLOT]], i8* [[T0]])