1 // RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s
2 // RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -o - | FileCheck %s
3 // expected-no-diagnostics
6 #pragma omp declare target
13 #pragma omp end declare target
20 void B::bar() { A a
; a
.foo(); }
21 void B::sbar() { A::sfoo(); }
22 #pragma omp declare target to(B::bar, B::sbar)
24 [[gnu::visibility("hidden")]] extern const int x
= 0;
25 #pragma omp declare target to(x) device_type(nohost)
27 [[gnu::visibility("hidden")]] int y
= 0;
28 #pragma omp declare target to(y)
30 // CHECK-DAG: @x = hidden{{.*}} constant i32 0
31 // CHECK-DAG: @y = protected{{.*}} i32 0
32 // CHECK-DAG: define hidden void @_ZN1B4sbarEv()
33 // CHECK-DAG: define linkonce_odr hidden void @_ZN1A4sfooEv()
34 // CHECK-DAG: define hidden void @_ZN1B3barEv(
35 // CHECK-DAG: define linkonce_odr hidden void @_ZN1A3fooEv(