[cfe-commits] r167678 - in /cfe/trunk: lib/CodeGen/CGBlocks.h test/CodeGenObjC/arc-blocks.m

Jordan Rose jordan_rose at apple.com
Sat Nov 10 10:53:40 PST 2012


Should we maybe put that in a comment, so that this won't happen again? We're out of bits now. :-(

Jordan


On Nov 10, 2012, at 10:30 , Fariborz Jahanian <fjahanian at apple.com> wrote:

> Author: fjahanian
> Date: Sat Nov 10 12:30:40 2012
> New Revision: 167678
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=167678&view=rev
> Log:
> objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
> lower 24bit is currently being used.
> 
> Modified:
>    cfe/trunk/lib/CodeGen/CGBlocks.h
>    cfe/trunk/test/CodeGenObjC/arc-blocks.m
> 
> Modified: cfe/trunk/lib/CodeGen/CGBlocks.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.h?rev=167678&r1=167677&r2=167678&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGBlocks.h (original)
> +++ cfe/trunk/lib/CodeGen/CGBlocks.h Sat Nov 10 12:30:40 2012
> @@ -59,12 +59,12 @@
> };
> 
> 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;
> 
> Modified: cfe/trunk/test/CodeGenObjC/arc-blocks.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-blocks.m?rev=167678&r1=167677&r2=167678&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGenObjC/arc-blocks.m (original)
> +++ cfe/trunk/test/CodeGenObjC/arc-blocks.m Sat Nov 10 12:30:40 2012
> @@ -119,7 +119,7 @@
>   // 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 @@
>   // 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 @@
>   // 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 @@
>   // 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]])
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list