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