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.
6 @interface NSObject <NSObject> {}
11 @protocol HasASelection <NSObject>
12 @property (nonatomic, retain) Selection* selection;
15 @interface MyClass : NSObject <HasASelection> {
16 Selection *_selection;
20 @implementation MyClass
21 @synthesize selection = _selection;
22 // CHECK: !DISubprogram(name: "-[MyClass selection]"
23 // CHECK-SAME: line: [[@LINE-2]]
24 // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
25 // CHECK: !DISubprogram(name: "-[MyClass setSelection:]"
26 // CHECK-SAME: line: [[@LINE-5]]
27 // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
30 @interface OtherClass : NSObject <HasASelection> {
31 Selection *_selection;
34 @implementation OtherClass
35 @synthesize selection = _selection;
36 // CHECK: !DISubprogram(name: "-[OtherClass selection]"
37 // CHECK-SAME: line: [[@LINE-2]]
38 // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
39 // CHECK: !DISubprogram(name: "-[OtherClass setSelection:]"
40 // CHECK-SAME: line: [[@LINE-5]]
41 // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition