brintos

brintos / llvm-project-archived public Read only

0
0
Text · 996 B · 0b92721 Raw
51 lines · plain
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.cpp2// 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.cpp3 4void *sel_registerName(const char *);5 6@interface __NSCFType7@end8 9@interface __NSCFString : __NSCFType10- (const char *)UTF8String;11@end12 13@implementation __NSCFString14- (const char *)UTF8String {15    return (const char *)[super UTF8String];16}17@end18 19// CHECK: call ptr @class_getSuperclass20 21@class NSZone;22 23@interface NSObject {24}25 26+ (id)allocWithZone:(NSZone *)zone;27@end28 29 30@interface NSArray : NSObject31@end32 33@implementation NSArray34+ (id)allocWithZone:(NSZone *)zone {35    return [super allocWithZone:zone];36}37@end38 39@interface XNSArray40{41  Class isa;42}43@end44 45@class XNSArray;46 47@interface __NSArray0 : XNSArray48@end49 50@implementation __NSArray0 @end51