1*67e74705SXin Li// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s 2*67e74705SXin Li// RUN: grep '.lazy_reference .objc_class_name_A' %t | count 1 3*67e74705SXin Li// RUN: grep '.lazy_reference .objc_class_name_Unknown' %t | count 1 4*67e74705SXin Li// RUN: grep '.lazy_reference .objc_class_name_Protocol' %t | count 1 5*67e74705SXin Li// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -DWITH_IMPL -emit-llvm -o %t %s 6*67e74705SXin Li// RUN: grep '.lazy_reference .objc_class_name_Root' %t | count 1 7*67e74705SXin Li 8*67e74705SXin Li@interface Root 9*67e74705SXin Li-(id) alloc; 10*67e74705SXin Li-(id) init; 11*67e74705SXin Li@end 12*67e74705SXin Li 13*67e74705SXin Li@protocol P; 14*67e74705SXin Li 15*67e74705SXin Li@interface A : Root 16*67e74705SXin Li@end 17*67e74705SXin Li 18*67e74705SXin Li@interface A (Category) 19*67e74705SXin Li+(void) foo; 20*67e74705SXin Li@end 21*67e74705SXin Li 22*67e74705SXin Li#ifdef WITH_IMPL 23*67e74705SXin Li@implementation A 24*67e74705SXin Li@end 25*67e74705SXin Li#endif 26*67e74705SXin Li 27*67e74705SXin Li@interface Unknown 28*67e74705SXin Li+test; 29*67e74705SXin Li@end 30*67e74705SXin Li 31*67e74705SXin Li 32*67e74705SXin Liint main() { 33*67e74705SXin Li id x = @protocol(P); 34*67e74705SXin Li [ A alloc ]; 35*67e74705SXin Li [ A foo ]; 36*67e74705SXin Li [ Unknown test ]; 37*67e74705SXin Li return 0; 38*67e74705SXin Li} 39*67e74705SXin Li 40