diff options
Diffstat (limited to 'test/CodeGen/captured-statements.c')
-rw-r--r-- | test/CodeGen/captured-statements.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/CodeGen/captured-statements.c b/test/CodeGen/captured-statements.c index 52747fb..b4fbfd4 100644 --- a/test/CodeGen/captured-statements.c +++ b/test/CodeGen/captured-statements.c @@ -14,21 +14,24 @@ void test1() { int i = 0; #pragma clang __debug captured { + static float inner = 3.0; + (void)inner; i++; } // CHECK-1: %struct.anon = type { i32* } + // CHECK-1: {{.+}} global float 3.0 // // CHECK-1: test1 // CHECK-1: alloca %struct.anon - // CHECK-1: getelementptr inbounds %struct.anon* + // CHECK-1: getelementptr inbounds %struct.anon, %struct.anon* // CHECK-1: store i32* %i - // CHECK-1: call void @[[HelperName:__captured_stmt[0-9]+]] + // CHECK-1: call void @[[HelperName:__captured_stmt[\.0-9]+]] } // CHECK-1: define internal void @[[HelperName]](%struct.anon // CHECK-1: getelementptr inbounds %struct.anon{{.*}}, i32 0, i32 0 -// CHECK-1: load i32** -// CHECK-1: load i32* +// CHECK-1: load i32*, i32** +// CHECK-1: load i32, i32* // CHECK-1: add nsw i32 // CHECK-1: store i32 @@ -42,7 +45,7 @@ void test2(int x) { } // CHECK-2: test2 // CHECK-2-NOT: %i - // CHECK-2: call void @[[HelperName:__captured_stmt[0-9]+]] + // CHECK-2: call void @[[HelperName:__captured_stmt[\.0-9]+]] } // CHECK-2: define internal void @[[HelperName]] @@ -70,7 +73,7 @@ void test4(intptr_t size, intptr_t vla_arr[size]) { } // CHECK-3: test4([[INTPTR_T:i.+]] {{.*}}[[SIZE_ARG:%.+]], [[INTPTR_T]]* // CHECK-3: store [[INTPTR_T]] {{.*}}[[SIZE_ARG]], [[INTPTR_T]]* [[SIZE_ADDR:%.+]], - // CHECK-3: [[SIZE:%.+]] = load [[INTPTR_T]]* [[SIZE_ADDR]], + // CHECK-3: [[SIZE:%.+]] = load [[INTPTR_T]], [[INTPTR_T]]* [[SIZE_ADDR]], // CHECK-3: [[REF:%.+]] = getelementptr inbounds // CHECK-3: store [[INTPTR_T]] [[SIZE]], [[INTPTR_T]]* [[REF]] // CHECK-3: call void @__captured_stmt @@ -87,11 +90,11 @@ void dont_capture_global() { } // CHECK-GLOBALS: %[[Capture:struct\.anon[\.0-9]*]] = type {} - // CHECK-GLOBALS: call void @__captured_stmt[[HelperName:[0-9]+]](%[[Capture]] + // CHECK-GLOBALS: call void @__captured_stmt[[HelperName:[\.0-9]+]](%[[Capture]] } // CHECK-GLOBALS: define internal void @__captured_stmt[[HelperName]] // CHECK-GLOBALS-NOT: ret -// CHECK-GLOBALS: load i32* @global -// CHECK-GLOBALS: load i32* @ -// CHECK-GLOBALS: load i32* @e +// CHECK-GLOBALS: load i32, i32* @global +// CHECK-GLOBALS: load i32, i32* @ +// CHECK-GLOBALS: load i32, i32* @e |