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