Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / declare_target_visibility_codegen.cpp
blob6518bac50623a4332a47e5fcf8286e9147d3bc65
1 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix=HOST
3 // expected-no-diagnostics
4 class C {
5 public:
6 //.
7 // HOST: @[[C:.+]] = internal global %class.C zeroinitializer, align 4
8 // HOST: @[[X:.+]] = internal global i32 0, align 4
9 // HOST: @y = hidden global i32 0
10 // HOST: @z = global i32 0
11 // HOST-NOT: @.omp_offloading.entry.c
12 // HOST-NOT: @.omp_offloading.entry.x
13 // HOST-NOT: @.omp_offloading.entry.y
14 // HOST: @.omp_offloading.entry.z
15 C() : x(0) {}
17 int x;
20 static C c;
21 #pragma omp declare target(c)
23 static int x;
24 #pragma omp declare target(x)
26 int __attribute__((visibility("hidden"))) y;
27 #pragma omp declare target(y)
29 int z;
30 #pragma omp declare target(z)