blob: f2d9ddba883ba311310cd00ff6d963c8841507d7 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep '.lazy_reference .objc_class_name_A' %t | count 1
3// RUN: grep '.lazy_reference .objc_class_name_Unknown' %t | count 1
4// RUN: grep '.lazy_reference .objc_class_name_Protocol' %t | count 1
John McCall260611a2012-06-20 06:18:46 +00005// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -DWITH_IMPL -emit-llvm -o %t %s
Daniel Dunbarb21d6af2008-09-04 04:36:23 +00006// RUN: grep '.lazy_reference .objc_class_name_Root' %t | count 1
7
8@interface Root
9-(id) alloc;
10-(id) init;
11@end
12
13@protocol P;
14
15@interface A : Root
16@end
17
18@interface A (Category)
19+(void) foo;
20@end
21
22#ifdef WITH_IMPL
23@implementation A
24@end
25#endif
26
27@interface Unknown
28+test;
29@end
30
31
32int main() {
33 id x = @protocol(P);
34 [ A alloc ];
35 [ A foo ];
36 [ Unknown test ];
37 return 0;
38}
39