blob: 5593b0d87f6a0daf36dbf96324db5c4dcfadaca1 [file] [log] [blame]
Douglas Katzman3459ce22015-10-08 04:24:12 +00001// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
Adrian Prantl6e785ec2013-05-17 23:49:10 +00002// 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;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000014// CHECK: !DISubprogram(name: "-[MyClass selection]"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000015// CHECK-SAME: line: [[@LINE-2]]
16// CHECK-SAME: isLocal: true, isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000017// CHECK: !DISubprogram(name: "-[MyClass setSelection:]"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000018// CHECK-SAME: line: [[@LINE-5]]
19// CHECK-SAME: isLocal: true, isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000020// CHECK: !DISubprogram(name: "-[OtherClass selection]"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000021// CHECK-SAME: line: [[@LINE-8]]
22// CHECK-SAME: isLocal: true, isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000023// CHECK: !DISubprogram(name: "-[OtherClass setSelection:]"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000024// CHECK-SAME: line: [[@LINE-11]]
25// CHECK-SAME: isLocal: true, isDefinition: true
26
Adrian Prantl6e785ec2013-05-17 23:49:10 +000027@end
28
29@interface MyClass : NSObject <HasASelection> {
30 Selection *_selection;
31}
32@end
33
34@implementation MyClass
35@synthesize selection = _selection;
36@end
37
38@interface OtherClass : NSObject <HasASelection> {
39 Selection *_selection;
40}
41@end
42@implementation OtherClass
43@synthesize selection = _selection;
44@end