xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/debuginfo-properties.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -g -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc// Check that we emit the correct method names for properties from a protocol.
3*f4a2713aSLionel Sambuc// rdar://problem/13798000
4*f4a2713aSLionel Sambuc@protocol NSObject
5*f4a2713aSLionel Sambuc- (id)init;
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc@interface NSObject <NSObject> {}
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@class Selection;
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc@protocol HasASelection <NSObject>
13*f4a2713aSLionel Sambuc@property (nonatomic, retain) Selection* selection;
14*f4a2713aSLionel Sambuc// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-1]]] [local] [def] [-[MyClass selection]]
15*f4a2713aSLionel Sambuc// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-2]]] [local] [def] [-[MyClass setSelection:]]
16*f4a2713aSLionel Sambuc// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-3]]] [local] [def] [-[OtherClass selection]]
17*f4a2713aSLionel Sambuc// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-4]]] [local] [def] [-[OtherClass setSelection:]]
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambuc@interface MyClass : NSObject <HasASelection> {
21*f4a2713aSLionel Sambuc  Selection *_selection;
22*f4a2713aSLionel Sambuc}
23*f4a2713aSLionel Sambuc@end
24*f4a2713aSLionel Sambuc
25*f4a2713aSLionel Sambuc@implementation MyClass
26*f4a2713aSLionel Sambuc@synthesize selection = _selection;
27*f4a2713aSLionel Sambuc@end
28*f4a2713aSLionel Sambuc
29*f4a2713aSLionel Sambuc@interface OtherClass : NSObject <HasASelection> {
30*f4a2713aSLionel Sambuc  Selection *_selection;
31*f4a2713aSLionel Sambuc}
32*f4a2713aSLionel Sambuc@end
33*f4a2713aSLionel Sambuc@implementation OtherClass
34*f4a2713aSLionel Sambuc@synthesize selection = _selection;
35*f4a2713aSLionel Sambuc@end
36