blob: ae87c7a8534570b549cdfbc63b9f143532011912 [file] [log] [blame]
Fariborz Jahanian64089ce2011-04-22 22:02:28 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -S -o %t %s
2// RUN: FileCheck < %t %s
3
4// rdar://9072317
5
6/** The problem looks like clang getting confused when a single translation unit
7 contains a protocol with a property and two classes that implement that protocol
8 and synthesize the property.
9*/
10
11@protocol Proto
12@property (assign) id prop;
13@end
14
15@interface NSObject @end
16
17@interface Foo : NSObject <Proto> { int x; } @end
18
19@interface Bar : NSObject <Proto> @end
20
21@implementation Foo
22@synthesize prop;
23@end
24
25@implementation Bar
26@synthesize prop;
27@end
28
29// CHECK: l_OBJC_$_INSTANCE_METHODS_Bar:
30// CHECK-NEXT .long 24
31// CHECK-NEXT .long 2
32// CHECK-NEXT .quad L_OBJC_METH_VAR_NAME_
33// CHECK-NEXT .quad L_OBJC_METH_VAR_TYPE_
34// CHECK-NEXT .quad "-[Bar prop]"