21 lines · plain
1// REQUIRES: x86-registered-target2// REQUIRES: nvptx-registered-target3 4// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm \5// RUN: -fopenmp -fopenmp-version=50 -o - %s | FileCheck %s6// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm \7// RUN: -fopenmp -fopenmp-version=50 -o - -x c++ %s | FileCheck %s8// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device \9// RUN: -emit-llvm -o - %s | FileCheck -check-prefixes=DEV %s10 11// CHECK: declare{{.*}}@_Z7nohost1v()12// DEV-NOT: _Z7nohost1v13void nohost1() {}14#pragma omp declare target to(nohost1) device_type(nohost)15 16// CHECK: declare{{.*}}@_Z7nohost2v()17// DEV-NOT: _Z7nohost2v18void nohost2() {nohost1();}19#pragma omp declare target to(nohost2) device_type(nohost)20 21