1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s
10 __attribute__((availability(macosx,introduced=9876.5)))
11 @interface MyClass : NSObject
12 + (void)someClassMethod;
13 - (void)someInstanceMethod;
16 @implementation MyClass
17 + (void)someClassMethod {
20 - (void)someInstanceMethod {
21 [MyClass someClassMethod];
28 MyClass *wrapper = [MyClass alloc];
31 // CHECK: @"OBJC_CLASS_$_MyClass" ={{.*}} global %struct._class_t
32 // CHECK: @"OBJC_METACLASS_$_NSObject" = external global %struct._class_t
33 // CHECK: @"OBJC_METACLASS_$_MyClass" ={{.*}} global %struct._class_t
34 // CHECK: @"OBJC_CLASS_$_NSObject" = external global %struct._class_t
36 __attribute__((weak_import))
37 @interface NSURLQueryItem : NSObject
40 @implementation NSURLQueryItem (hax)
41 +(void)classmethod { [super class]; }
44 // CHECK: @"OBJC_METACLASS_$_NSURLQueryItem" = extern_weak global
45 // CHECK: @"OBJC_CLASS_$_NSURLQueryItem" = extern_weak global
47 __attribute__((visibility("default"))) __attribute__((availability(ios,introduced=9876.5)))
48 @interface AVScheduledAudioParameters @end
50 @interface XXXX : AVScheduledAudioParameters
53 @implementation AVScheduledAudioParameters @end
54 @implementation XXXX @end
56 // CHECK: @"OBJC_CLASS_$_AVScheduledAudioParameters" ={{.*}} global %struct._class_t
57 // CHECK: @"OBJC_METACLASS_$_AVScheduledAudioParameters" ={{.*}} global %struct._class_t