1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin8.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_4 %s
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin9.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_5 %s
3*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin10.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_6 %s
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc // CHECK-10_4-LABEL: define hidden void @f2
6*f4a2713aSLionel Sambuc // CHECK-10_5-LABEL: define hidden void @f2
7*f4a2713aSLionel Sambuc // CHECK-10_6-LABEL: define hidden void @f2
8*f4a2713aSLionel Sambuc void f2();
f2()9*f4a2713aSLionel Sambuc void f2() { }
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc // CHECK-10_4-LABEL: define void @f3
12*f4a2713aSLionel Sambuc // CHECK-10_5-LABEL: define void @f3
13*f4a2713aSLionel Sambuc // CHECK-10_6-LABEL: define void @f3
14*f4a2713aSLionel Sambuc void f3() __attribute__((availability(macosx,introduced=10.5)));
f3()15*f4a2713aSLionel Sambuc void f3() { }
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc // CHECK-10_4: declare extern_weak void @f0
18*f4a2713aSLionel Sambuc // CHECK-10_5: declare void @f0
19*f4a2713aSLionel Sambuc // CHECK-10_6: declare void @f0
20*f4a2713aSLionel Sambuc void f0() __attribute__((availability(macosx,introduced=10.5)));
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc // CHECK-10_4: declare extern_weak void @f1
23*f4a2713aSLionel Sambuc // CHECK-10_5: declare extern_weak void @f1
24*f4a2713aSLionel Sambuc // CHECK-10_6: declare void @f1
25*f4a2713aSLionel Sambuc void f1() __attribute__((availability(macosx,introduced=10.6)));
26*f4a2713aSLionel Sambuc 
test()27*f4a2713aSLionel Sambuc void test() {
28*f4a2713aSLionel Sambuc   f0();
29*f4a2713aSLionel Sambuc   f1();
30*f4a2713aSLionel Sambuc   f2();
31*f4a2713aSLionel Sambuc }
32