1*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s 2*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -o - %s | FileCheck %s 3*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s 4*0a6a1f1dSLionel Sambuc// rdar://16206443 5*0a6a1f1dSLionel Sambuc 6*0a6a1f1dSLionel Sambuc@interface NSObject 7*0a6a1f1dSLionel Sambuc- (void) finalize; 8*0a6a1f1dSLionel Sambuc+ (void) class; 9*0a6a1f1dSLionel Sambuc@end 10*0a6a1f1dSLionel Sambuc 11*0a6a1f1dSLionel Sambuc__attribute__((availability(macosx,introduced=9876.5))) 12*0a6a1f1dSLionel Sambuc@interface MyClass : NSObject 13*0a6a1f1dSLionel Sambuc+ (void)someClassMethod; 14*0a6a1f1dSLionel Sambuc- (void)someInstanceMethod; 15*0a6a1f1dSLionel Sambuc@end 16*0a6a1f1dSLionel Sambuc 17*0a6a1f1dSLionel Sambuc@implementation MyClass 18*0a6a1f1dSLionel Sambuc+ (void)someClassMethod { 19*0a6a1f1dSLionel Sambuc} 20*0a6a1f1dSLionel Sambuc 21*0a6a1f1dSLionel Sambuc- (void)someInstanceMethod { 22*0a6a1f1dSLionel Sambuc [MyClass someClassMethod]; 23*0a6a1f1dSLionel Sambuc [super finalize]; 24*0a6a1f1dSLionel Sambuc} 25*0a6a1f1dSLionel Sambuc@end 26*0a6a1f1dSLionel Sambuc 27*0a6a1f1dSLionel Sambucvoid kit() 28*0a6a1f1dSLionel Sambuc{ 29*0a6a1f1dSLionel Sambuc MyClass *wrapper = [MyClass alloc]; 30*0a6a1f1dSLionel Sambuc} 31*0a6a1f1dSLionel Sambuc 32*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_CLASS_$_MyClass" = global %struct._class_t 33*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_METACLASS_$_NSObject" = external global %struct._class_t 34*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_METACLASS_$_MyClass" = global %struct._class_t 35*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_CLASS_$_NSObject" = external global %struct._class_t 36*0a6a1f1dSLionel Sambuc 37*0a6a1f1dSLionel Sambuc// rdar://16529125 38*0a6a1f1dSLionel Sambuc__attribute__((weak_import)) 39*0a6a1f1dSLionel Sambuc@interface NSURLQueryItem : NSObject 40*0a6a1f1dSLionel Sambuc@end 41*0a6a1f1dSLionel Sambuc 42*0a6a1f1dSLionel Sambuc@implementation NSURLQueryItem (hax) 43*0a6a1f1dSLionel Sambuc+(void)classmethod { [super class]; } 44*0a6a1f1dSLionel Sambuc@end 45*0a6a1f1dSLionel Sambuc 46*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_METACLASS_$_NSURLQueryItem" = extern_weak global 47*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_CLASS_$_NSURLQueryItem" = extern_weak global 48*0a6a1f1dSLionel Sambuc 49*0a6a1f1dSLionel Sambuc// rdar://17633301 50*0a6a1f1dSLionel Sambuc__attribute__((visibility("default"))) __attribute__((availability(ios,introduced=9876.5))) 51*0a6a1f1dSLionel Sambuc@interface AVScheduledAudioParameters @end 52*0a6a1f1dSLionel Sambuc 53*0a6a1f1dSLionel Sambuc@interface XXXX : AVScheduledAudioParameters 54*0a6a1f1dSLionel Sambuc@end 55*0a6a1f1dSLionel Sambuc 56*0a6a1f1dSLionel Sambuc@implementation AVScheduledAudioParameters @end 57*0a6a1f1dSLionel Sambuc@implementation XXXX @end 58*0a6a1f1dSLionel Sambuc 59*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_CLASS_$_AVScheduledAudioParameters" = global %struct._class_t 60*0a6a1f1dSLionel Sambuc// CHECK: @"OBJC_METACLASS_$_AVScheduledAudioParameters" = global %struct._class_t 61