Home | History | Annotate | Download | only in CodeGen
      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: define hidden void @f2
      6 // CHECK-10_5: define hidden void @f2
      7 // CHECK-10_6: define hidden void @f2
      8 void f2();
      9 void f2() { }
     10 
     11 // CHECK-10_4: define void @f3
     12 // CHECK-10_5: define void @f3
     13 // CHECK-10_6: define void @f3
     14 void f3() __attribute__((availability(macosx,introduced=10.5)));
     15 void f3() { }
     16 
     17 // CHECK-10_4: declare extern_weak void @f0
     18 // CHECK-10_5: declare void @f0
     19 // CHECK-10_6: declare void @f0
     20 void f0() __attribute__((availability(macosx,introduced=10.5)));
     21 
     22 // CHECK-10_4: declare extern_weak void @f1
     23 // CHECK-10_5: declare extern_weak void @f1
     24 // CHECK-10_6: declare void @f1
     25 void f1() __attribute__((availability(macosx,introduced=10.6)));
     26 
     27 void test() {
     28   f0();
     29   f1();
     30   f2();
     31 }
     32