llvm-project/clang/test/OpenMP/nvptx_throw_trap.cpp
Tarun Prabhu 9d49fe4ecc
[clang] Fix test to require x86
This test would fail if the x86 target had not been built. This fix
makes the requirement on x86 explicit. Trailing whitespace has also been
removed.
2025-10-08 13:54:00 -06:00

14 lines
553 B
C++

// REQUIRES: nvptx-registered-target, x86-registered-target
// RUN: %clang_cc1 -fopenmp -triple nvptx64 -fopenmp-is-target-device %s -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s
// RUN: %clang_cc1 -fopenmp -triple x86_64-pc-linux-gnu -fopenmp-is-target-device -fcxx-exceptions %s -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=HOST %s
// DEVICE: trap;
// DEVICE-NOT: __cxa_throw
// HOST: __cxa_throw
// HOST-NOT: trap;
#pragma omp declare target
void foo(void) {
throw 404;
}
#pragma omp end declare target