1// RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin8.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_4 %s
2// RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin9.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_5 %s
3// RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin10.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_6 %s
4
5// CHECK-10_4: @"OBJC_CLASS_$_WeakClass1" = extern_weak global
6// CHECK-10_5: @"OBJC_CLASS_$_WeakClass1" = external global
7// CHECK-10_6: @"OBJC_CLASS_$_WeakClass1" = external global
8__attribute__((availability(macosx,introduced=10.5)))
9@interface WeakClass1 @end
10
11@implementation WeakClass1(MyCategory) @end
12
13@implementation WeakClass1(YourCategory) @end
14
15// CHECK-10_4: @"OBJC_CLASS_$_WeakClass2" = extern_weak global
16// CHECK-10_5: @"OBJC_CLASS_$_WeakClass2" = extern_weak global
17// CHECK-10_6: @"OBJC_CLASS_$_WeakClass2" = external global
18__attribute__((availability(macosx,introduced=10.6)))
19@interface WeakClass2 @end
20
21@implementation WeakClass2(MyCategory) @end
22
23@implementation WeakClass2(YourCategory) @end
24
25// CHECK-10_4: @"OBJC_CLASS_$_WeakClass3" = extern_weak global
26// CHECK-10_5: @"OBJC_CLASS_$_WeakClass3" = extern_weak global
27// CHECK-10_6: @"OBJC_CLASS_$_WeakClass3" = external global
28__attribute__((availability(macosx,introduced=10.6)))
29@interface WeakClass3 @end
30@class WeakClass3;
31
32@implementation WeakClass3(MyCategory) @end
33
34@implementation WeakClass3(YourCategory) @end
35
36