• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 -fsyntax-only -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// radar 7738453
4
5void *sel_registerName(const char *);
6
7@interface __NSCFType
8@end
9
10@interface __NSCFString : __NSCFType
11- (const char *)UTF8String;
12@end
13
14@implementation __NSCFString
15- (const char *)UTF8String {
16    return (const char *)[super UTF8String];
17}
18@end
19
20// CHECK: call %struct.objc_class* @class_getSuperclass
21
22@class NSZone;
23
24@interface NSObject {
25}
26
27+ (id)allocWithZone:(NSZone *)zone;
28@end
29
30
31@interface NSArray : NSObject
32@end
33
34@implementation NSArray
35+ (id)allocWithZone:(NSZone *)zone {
36    return [super allocWithZone:zone];
37}
38@end
39
40@interface XNSArray
41{
42  Class isa;
43}
44@end
45
46@class XNSArray;
47
48@interface __NSArray0 : XNSArray
49@end
50
51@implementation __NSArray0 @end
52