comparison clang/test/CodeGen/aix-visibility-inlines-hidden.cpp @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 // RUN: %clang_cc1 -triple powerpc-unknown-aix -mcmodel=large -emit-llvm -o - -x c++ %s | \
2 // RUN: FileCheck -check-prefix=NOVISIBILITY-IR %s
3
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-prefix=NOVISIBILITY-IR %s
7
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-prefix=VISIBILITY-IR %s
11
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
15
16 int x = 66;
17 __attribute__((__noinline__)) inline void f() {
18 x = 55;
19 }
20
21 #pragma GCC visibility push(hidden)
22 __attribute__((__noinline__)) inline void foo() {
23 x = 55;
24 }
25 #pragma GCC visibility pop
26
27 int bar() {
28 f();
29 foo();
30 return x;
31 }
32
33 // VISIBILITY-IR: define linkonce_odr hidden void @_Z1fv()
34 // NOVISIBILITY-IR: define linkonce_odr void @_Z1fv()
35
36 // VISIBILITY-IR: define linkonce_odr hidden void @_Z3foov()
37 // NOVISIBILITY-IR: define linkonce_odr void @_Z3foov()