| 1 |
// REQUIRES: x86-registered-target |
| 2 |
// REQUIRES: nvptx-registered-target |
| 3 |
|
| 4 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm \ |
| 5 |
// RUN: -fopenmp -fopenmp-version=50 -o - %s | FileCheck %s |
| 6 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm \ |
| 7 |
// RUN: -fopenmp -fopenmp-version=50 -o - -x c++ %s | FileCheck %s |
| 8 |
// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device \ |
| 9 |
// RUN: -emit-llvm -o - %s | FileCheck -check-prefixes=DEV %s |
| 10 |
|
| 11 |
// CHECK: declare{{.*}}@_Z7nohost1v() |
| 12 |
// DEV-NOT: _Z7nohost1v |
| 13 |
void nohost1() {} |
| 14 |
#pragma omp declare target to(nohost1) device_type(nohost) |
| 15 |
|
| 16 |
// CHECK: declare{{.*}}@_Z7nohost2v() |
| 17 |
// DEV-NOT: _Z7nohost2v |
| 18 |
void nohost2() {nohost1();} |
| 19 |
#pragma omp declare target to(nohost2) device_type(nohost) |
| 20 |
|