llvm-project/clang/test/CodeGenObjC/instance-method-metadata.m
Fariborz Jahanian c057794adb Fixes an instance method meta-data generation bug in
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317

llvm-svn: 130019
2011-04-22 22:02:28 +00:00

35 lines
839 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -S -o %t %s
// RUN: FileCheck < %t %s
// rdar://9072317
/** The problem looks like clang getting confused when a single translation unit
contains a protocol with a property and two classes that implement that protocol
and synthesize the property.
*/
@protocol Proto
@property (assign) id prop;
@end
@interface NSObject @end
@interface Foo : NSObject <Proto> { int x; } @end
@interface Bar : NSObject <Proto> @end
@implementation Foo
@synthesize prop;
@end
@implementation Bar
@synthesize prop;
@end
// CHECK: l_OBJC_$_INSTANCE_METHODS_Bar:
// CHECK-NEXT .long 24
// CHECK-NEXT .long 2
// CHECK-NEXT .quad L_OBJC_METH_VAR_NAME_
// CHECK-NEXT .quad L_OBJC_METH_VAR_TYPE_
// CHECK-NEXT .quad "-[Bar prop]"