1 // RUN: %clang_cc1 -emit-llvm -x objective-c -debug-info-kind=limited -triple x86_64-apple-macosx10.8.0 %s -o - | FileCheck %s 2 // 3 // rdar://problem/14035789 4 // 5 // Ensure we emit the names of explicit/renamed accessors even if they 6 // are defined later in the implementation section. 7 // 8 // CHECK: !DIObjCProperty(name: "blah" 9 // CHECK-SAME: getter: "isBlah" 10 11 @class NSString; 12 extern void NSLog(NSString *format, ...); 13 typedef signed char BOOL; 14 15 #define YES ((BOOL)1) 16 #define NO ((BOOL)0) 17 18 typedef unsigned int NSUInteger; 19 20 @protocol NSObject 21 @end 22 23 @interface NSObject <NSObject> 24 - (id)init; 25 + (id)alloc; 26 @end 27 28 @interface Bar : NSObject 29 @property int normal_property; 30 @property (getter=isBlah, setter=setBlah:) BOOL blah; 31 @end 32 33 @implementation Bar 34 @synthesize normal_property; 35 36 - (BOOL) isBlah 37 { 38 return YES; 39 } 40 - (void) setBlah: (BOOL) newBlah 41 { 42 NSLog (@"Speak up, I didn't catch that."); 43 } 44 @end 45 46 int 47 main () 48 { 49 Bar *my_bar = [[Bar alloc] init]; 50 51 if (my_bar.blah) 52 NSLog (@"It was true!!!"); 53 54 my_bar.blah = NO; 55 56 return 0; 57 } 58