brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 3c9d8f8 Raw
43 lines · plain
1// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s2// Check that we emit the correct method names for properties from a protocol.3@protocol NSObject4- (id)init;5@end6@interface NSObject <NSObject> {}7@end8 9@class Selection;10 11@protocol HasASelection <NSObject>12@property (nonatomic, retain) Selection* selection;13@end14 15@interface MyClass : NSObject <HasASelection> {16  Selection *_selection;17}18@end19 20@implementation MyClass21@synthesize selection = _selection;22// CHECK: !DISubprogram(name: "-[MyClass selection]"23// CHECK-SAME:          line: [[@LINE-2]]24// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition25// CHECK: !DISubprogram(name: "-[MyClass setSelection:]"26// CHECK-SAME:          line: [[@LINE-5]]27// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition28@end29 30@interface OtherClass : NSObject <HasASelection> {31  Selection *_selection;32}33@end34@implementation OtherClass35@synthesize selection = _selection;36// CHECK: !DISubprogram(name: "-[OtherClass selection]"37// CHECK-SAME:          line: [[@LINE-2]]38// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition39// CHECK: !DISubprogram(name: "-[OtherClass setSelection:]"40// CHECK-SAME:          line: [[@LINE-5]]41// CHECK-SAME:          DISPFlagLocalToUnit | DISPFlagDefinition42@end43