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
7 @interface NSObject <NSObject> {}
12 @protocol HasASelection <NSObject>
13 @property (nonatomic, retain) Selection* selection;
16 @interface MyClass : NSObject <HasASelection> {
17 Selection *_selection;
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
31 @interface OtherClass : NSObject <HasASelection> {
32 Selection *_selection;
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