1 // RUN: %clang_cc1 %s -emit-llvm -o %t -fblocks
2 // RUN: grep "_Block_object_dispose" %t | count 17
3 // RUN: grep "__copy_helper_block_" %t | count 16
4 // RUN: grep "__destroy_helper_block_" %t | count 16
5 // RUN: grep "__Block_byref_object_copy_" %t | count 2
6 // RUN: grep "__Block_byref_object_dispose_" %t | count 2
7 // RUN: grep "i32 135)" %t | count 2
8 // RUN: grep "_Block_object_assign" %t | count 10
10 int printf(const char *, ...);
16 printf("a is %d, b is %d\n", a
, b
);
17 ^{ a
= 10; printf("a is %d, b is %d\n", a
, b
); }();
18 printf("a is %d, b is %d\n", a
, b
);
20 printf("a is %d, b is %d\n", a
, b
);
26 printf("a is %d\n", a
);
32 printf("a is %d\n", a
);
34 printf("a is %d\n", a
);
39 __block
int (^j
)(int);
46 ^(int j
){ i
= j
; g
= 0; }(0);
53 __block
struct { int i
; } i
;