minix/external/bsd/llvm/dist/clang/test/CodeGenObjC/debug-info-block-helper.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

30 lines
617 B
Objective-C

// REQUIRES: x86-64-registered-target
// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
extern void foo(void(^)(void));
// CHECK: [ DW_TAG_subprogram ] {{.*}} [__destroy_helper_block_]
@interface NSObject {
struct objc_object *isa;
}
@end
@interface A:NSObject @end
@implementation A
- (void) helper {
int master = 0;
__block int m2 = 0;
__block int dbTransaction = 0;
int (^x)(void) = ^(void) { (void) self;
(void) master;
(void) dbTransaction;
m2++;
return m2;
};
master = x();
}
@end
void foo(void(^x)(void)) {}