1 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
2 // Make sure we do not generate line info for debugging-related frame setup.
3 // CHECK: define {{.*}}block_invoke
4 // CHECK-NOT: store {{.*}}ptr{{.*}}dbg
5 // CHECK: store {{.*}}ptr{{.*}}, align
7 // CHECK: define {{.*}}block_invoke
8 // CHECK-NOT: store {{.*}}ptr{{.*}}dbg
9 // CHECK: store {{.*}}ptr{{.*}}, align
11 // CHECK: define {{.*}}block_invoke
12 // CHECK-NOT: store {{.*}}ptr{{.*}}dbg
13 // CHECK: store {{.*}}ptr{{.*}}, align
15 int printf(const char*, ...);
17 static void* _NSConcreteGlobalBlock
;
20 typedef void (^ HelloBlock_t
)(const char * name
);
22 /* Breakpoint for first Block function. */
23 HelloBlock_t helloBlock
= ^(const char * name
) {
24 printf("Hello there, %s!\n", name
);
27 /* Breakpoint for second Block function. */
28 static HelloBlock_t s_helloBlock
= ^(const char * name
) {
29 printf("Hello there, %s!\n", name
);
32 /* Breakpoint for third Block function. */
34 int (^CP
)(void) = ^{ X
= X
+1; return X
; };
37 main(int argc
, char * argv
[])
40 s_helloBlock("world");
43 printf ("X = %d\n", X
);