Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / attr-availability.c
blobe950b6abcd1a0d2103291f0c7b24c0fe4d223968
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
5 // CHECK-10_4-LABEL: define hidden void @f2
6 // CHECK-10_5-LABEL: define hidden void @f2
7 // CHECK-10_6-LABEL: define hidden void @f2
8 void f2(void);
9 void f2(void) { }
11 // CHECK-10_4-LABEL: define hidden void @f3
12 // CHECK-10_5-LABEL: define hidden void @f3
13 // CHECK-10_6-LABEL: define hidden void @f3
14 void f3(void) __attribute__((availability(macosx,introduced=10.5)));
15 void f3(void) { }
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(void) __attribute__((availability(macosx,introduced=10.5)));
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(void) __attribute__((availability(macosx,introduced=10.6)));
27 void test(void) {
28 f0();
29 f1();
30 f2();