• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
2// Check that we emit the correct method names for properties from a protocol.
3// rdar://problem/13798000
4@protocol NSObject
5- (id)init;
6@end
7@interface NSObject <NSObject> {}
8@end
9
10@class Selection;
11
12@protocol HasASelection <NSObject>
13@property (nonatomic, retain) Selection* selection;
14@end
15
16@interface MyClass : NSObject <HasASelection> {
17  Selection *_selection;
18}
19@end
20
21@implementation MyClass
22@synthesize selection = _selection;
23// CHECK: !DISubprogram(name: "-[MyClass selection]"
24// CHECK-SAME:          line: [[@LINE-2]]
25// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition
26// CHECK: !DISubprogram(name: "-[MyClass setSelection:]"
27// CHECK-SAME:          line: [[@LINE-5]]
28// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition
29@end
30
31@interface OtherClass : NSObject <HasASelection> {
32  Selection *_selection;
33}
34@end
35@implementation OtherClass
36@synthesize selection = _selection;
37// CHECK: !DISubprogram(name: "-[OtherClass selection]"
38// CHECK-SAME:          line: [[@LINE-2]]
39// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition
40// CHECK: !DISubprogram(name: "-[OtherClass setSelection:]"
41// CHECK-SAME:          line: [[@LINE-5]]
42// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition
43@end
44