44 lines · plain
1// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o2// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation3// RUN: %test_debuginfo %s %t.out 4 5// REQUIRES: system-darwin6// Radar 92799567 8// DEBUGGER: break 319// DEBUGGER: r10// DEBUGGER: p m211// CHECK: ${{[0-9]}} = 112// DEBUGGER: p dbTransaction13// CHECK: ${{[0-9]}} = 014// DEBUGGER: p controller15// CHECK: ${{[0-9]}} = 016 17#include <Cocoa/Cocoa.h>18 19extern void foo(void(^)(void));20 21@interface A:NSObject @end22@implementation A23- (void) helper {24 int controller = 0;25 __block int m2 = 0;26 __block int dbTransaction = 0;27 int (^x)(void) = ^(void) { (void) self; 28 (void) controller; 29 (void) dbTransaction; 30 m2++;31 return m2;32 };33 controller = x();34}35@end36 37void foo(void(^x)(void)) {}38 39int main() {40 A *a = [A alloc];41 [a helper];42 return 0;43}44