| 1 |
// REQUIRES: x86-registered-target |
| 2 |
// RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s |
| 3 |
extern void foo(void(^)(void)); |
| 4 |
|
| 5 |
// CHECK: !DISubprogram(linkageName: "__destroy_helper_block_8_32o40r48r" |
| 6 |
|
| 7 |
@interface NSObject { |
| 8 |
struct objc_object *isa; |
| 9 |
} |
| 10 |
@end |
| 11 |
|
| 12 |
@interface A:NSObject @end |
| 13 |
@implementation A |
| 14 |
- (void) helper { |
| 15 |
int controller = 0; |
| 16 |
__block int m2 = 0; |
| 17 |
__block int dbTransaction = 0; |
| 18 |
int (^x)(void) = ^(void) { (void) self; |
| 19 |
(void) controller; |
| 20 |
(void) dbTransaction; |
| 21 |
m2++; |
| 22 |
return m2; |
| 23 |
|
| 24 |
}; |
| 25 |
controller = x(); |
| 26 |
} |
| 27 |
@end |
| 28 |
|
| 29 |
void foo(void(^x)(void)) {} |
| 30 |
|