[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / PowerPC / aix-visibility-inlines-hidden.cpp
blob739d68113e82d264a312226d92cb4192684aa25a
1 // RUN: %clang_cc1 -triple powerpc-unknown-aix -mcmodel=large -emit-llvm -o - -x c++ %s | \
2 // RUN: FileCheck -check-prefix=VISIBILITY-IR %s
4 // RUN: %clang_cc1 -triple powerpc-unknown-aix -mcmodel=large \
5 // RUN: -fvisibility-inlines-hidden -emit-llvm -o - -x c++ %s | \
6 // RUN: FileCheck -check-prefixes=VISIBILITY-IR,HIDDENINLINE-IR %s
8 // RUN: %clang_cc1 -triple powerpc-unknown-aix -mcmodel=large -fvisibility-inlines-hidden \
9 // RUN: -fvisibility=default -emit-llvm -o - -x c++ %s | \
10 // RUN: FileCheck -check-prefixes=VISIBILITY-IR,HIDDENINLINE-IR %s
12 // RUN: %clang_cc1 -triple powerpc-unknown-aix -mcmodel=large -mignore-xcoff-visibility -emit-llvm \
13 // RUN: -fvisibility-inlines-hidden -fvisibility=default -o - -x c++ %s | \
14 // RUN: FileCheck -check-prefix=NOVISIBILITY-IR %s
16 int x = 66;
17 __attribute__((__noinline__)) inline void f() {
18 x = 55;
21 #pragma GCC visibility push(hidden)
22 __attribute__((__noinline__)) inline void foo() {
23 x = 55;
25 #pragma GCC visibility pop
27 int bar() {
28 f();
29 foo();
30 return x;
33 // HIDDENINLINE-IR: define linkonce_odr hidden void @_Z1fv()
34 // NOVISIBILITY-IR: define linkonce_odr void @_Z1fv()
36 // VISIBILITY-IR: define linkonce_odr hidden void @_Z3foov()
37 // NOVISIBILITY-IR: define linkonce_odr void @_Z3foov()