| 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 | // CHECK: !DISubprogram(name: "-[MyClass selection]" |
| 15 | // CHECK-SAME: line: [[@LINE-2]] |
| 16 | // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition |
| 17 | // CHECK: !DISubprogram(name: "-[MyClass setSelection:]" |
| 18 | // CHECK-SAME: line: [[@LINE-5]] |
| 19 | // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition |
| 20 | // CHECK: !DISubprogram(name: "-[OtherClass selection]" |
| 21 | // CHECK-SAME: line: [[@LINE-8]] |
| 22 | // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition |
| 23 | // CHECK: !DISubprogram(name: "-[OtherClass setSelection:]" |
| 24 | // CHECK-SAME: line: [[@LINE-11]] |
| 25 | // CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition |
| 26 | |
| 27 | @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 |
| 45 | |