| 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 |
| 2 |
|
| 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: @.offloading.entry.c |
| 12 |
// HOST-NOT: @.offloading.entry.x |
| 13 |
// HOST-NOT: @.offloading.entry.y |
| 14 |
// HOST: @.offloading.entry.z |
| 15 |
C() : x(0) {} |
| 16 |
|
| 17 |
int x; |
| 18 |
}; |
| 19 |
|
| 20 |
static C c; |
| 21 |
#pragma omp declare target(c) |
| 22 |
|
| 23 |
static int x; |
| 24 |
#pragma omp declare target(x) |
| 25 |
|
| 26 |
int __attribute__((visibility("hidden"))) y; |
| 27 |
#pragma omp declare target(y) |
| 28 |
|
| 29 |
int z; |
| 30 |
#pragma omp declare target(z) |