• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// REQUIRES: x86-registered-target
2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o %t %s
3// RUN: FileCheck < %t %s
4
5// rdar://9072317
6
7/** The problem looks like clang getting confused when a single translation unit
8    contains a protocol with a property and two classes that implement that protocol
9    and synthesize the property.
10*/
11
12@protocol Proto
13@property (assign) id prop;
14@end
15
16@interface NSObject @end
17
18@interface Foo : NSObject <Proto> { int x; } @end
19
20@interface Bar : NSObject <Proto> @end
21
22@implementation Foo
23@synthesize prop;
24@end
25
26@implementation Bar
27@synthesize prop;
28@end
29
30// CHECK: l_OBJC_$_INSTANCE_METHODS_Bar:
31// CHECK-NEXT:        .long   24
32// CHECK-NEXT:        .long   2
33// CHECK-NEXT:        .quad   L_OBJC_METH_VAR_NAME_
34// CHECK-NEXT:        .quad   L_OBJC_METH_VAR_TYPE_
35// CHECK-NEXT:        .quad   "-[Bar prop]"
36