| 1 |
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp |
| 2 |
// RUN: %clang_cc1 -Wno-address-of-temporary -DKEEP_ATTRIBUTES -D"id=struct objc_object *" -D"Class=struct objc_class *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o - %t-rw.cpp | FileCheck %t-rw.cpp |
| 3 |
|
| 4 |
void *sel_registerName(const char *); |
| 5 |
|
| 6 |
@interface __NSCFType |
| 7 |
@end |
| 8 |
|
| 9 |
@interface __NSCFString : __NSCFType |
| 10 |
- (const char *)UTF8String; |
| 11 |
@end |
| 12 |
|
| 13 |
@implementation __NSCFString |
| 14 |
- (const char *)UTF8String { |
| 15 |
return (const char *)[super UTF8String]; |
| 16 |
} |
| 17 |
@end |
| 18 |
|
| 19 |
// CHECK: call ptr @class_getSuperclass |
| 20 |
|
| 21 |
@class NSZone; |
| 22 |
|
| 23 |
@interface NSObject { |
| 24 |
} |
| 25 |
|
| 26 |
+ (id)allocWithZone:(NSZone *)zone; |
| 27 |
@end |
| 28 |
|
| 29 |
|
| 30 |
@interface NSArray : NSObject |
| 31 |
@end |
| 32 |
|
| 33 |
@implementation NSArray |
| 34 |
+ (id)allocWithZone:(NSZone *)zone { |
| 35 |
return [super allocWithZone:zone]; |
| 36 |
} |
| 37 |
@end |
| 38 |
|
| 39 |
@interface XNSArray |
| 40 |
{ |
| 41 |
Class isa; |
| 42 |
} |
| 43 |
@end |
| 44 |
|
| 45 |
@class XNSArray; |
| 46 |
|
| 47 |
@interface __NSArray0 : XNSArray |
| 48 |
@end |
| 49 |
|
| 50 |
@implementation __NSArray0 @end |