summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/blocksignature.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-07 10:33:21 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-07 10:33:21 +0000
commit351762cda239e2bb90fb2084e546878fea90ebf6 (patch)
tree22efeaf25ffe22b569427e2cb8054db1c5ec5172 /clang/test/CodeGen/blocksignature.c
parent867cb633b428b0017ea8ecf548176ae6000fcef2 (diff)
downloadbcm5719-llvm-351762cda239e2bb90fb2084e546878fea90ebf6.tar.gz
bcm5719-llvm-351762cda239e2bb90fb2084e546878fea90ebf6.zip
A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. llvm-svn: 125005
Diffstat (limited to 'clang/test/CodeGen/blocksignature.c')
-rw-r--r--clang/test/CodeGen/blocksignature.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/CodeGen/blocksignature.c b/clang/test/CodeGen/blocksignature.c
index 26f2048bbcc..7526f19468e 100644
--- a/clang/test/CodeGen/blocksignature.c
+++ b/clang/test/CodeGen/blocksignature.c
@@ -6,9 +6,11 @@
// X64: @.str1 = private unnamed_addr constant [12 x i8] c"i16@?0c8f12\00"
// X64: store i32 1073741824, i32*
-// X32: @.str = private unnamed_addr constant [6 x i8] c"v4@?0\00"
-// X32: @__block_literal_global = internal constant %1 { i8** @_NSConcreteGlobalBlock, i32 1342177280,
-// X32: @.str1 = private unnamed_addr constant [11 x i8] c"i12@?0c4f8\00"
+// X32: [[STR1:@.*]] = private unnamed_addr constant [6 x i8] c"v4@?0\00"
+// X32: @__block_descriptor_tmp = internal constant [[FULL_DESCRIPTOR_T:%.*]] { i32 0, i32 20, i8* getelementptr inbounds ([6 x i8]* [[STR1]], i32 0, i32 0), i8* null }
+// X32: @__block_literal_global = internal constant [[GLOBAL_LITERAL_T:%.*]] { i8** @_NSConcreteGlobalBlock, i32 1342177280, i32 0, i8* bitcast (void (i8*)* @__block_global_{{.*}} to i8*), [[DESCRIPTOR_T:%.*]]* bitcast ([[FULL_DESCRIPTOR_T]]* @__block_descriptor_tmp to {{%.*}}*) }
+// X32: [[STR2:@.*]] = private unnamed_addr constant [11 x i8] c"i12@?0c4f8\00"
+// X32: @__block_descriptor_tmp{{.*}} = internal constant [[FULL_DESCRIPTOR_T]] { i32 0, i32 24, i8* getelementptr inbounds ([11 x i8]* [[STR2]], i32 0, i32 0), i8* null }
// X32: store i32 1073741824, i32*
// rdar://7635294
OpenPOWER on IntegriCloud