[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / invalid-offload-options.cpp
blob48d5310538a3cf7ad77ea586c8cd7f2bb25f4404
1 // UNSUPPORTED: system-windows
3 // RUN: not %clang -### -x hip --target=x86_64-linux-gnu --offload= \
4 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \
5 // RUN: 2>&1 | FileCheck --check-prefix=INVALID-TARGET %s
6 // RUN: not %clang -### -x hip --target=x86_64-linux-gnu --offload=foo \
7 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \
8 // RUN: 2>&1 | FileCheck --check-prefix=INVALID-TARGET %s
10 // INVALID-TARGET: error: invalid or unsupported offload target: '{{.*}}'
12 // In the future we should be able to specify multiple targets for HIP
13 // compilation but currently it is not supported.
15 // RUN: not %clang -### -x hip --target=x86_64-linux-gnu --offload=foo,bar \
16 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \
17 // RUN: 2>&1 | FileCheck --check-prefix=TOO-MANY-TARGETS %s
18 // RUN: not %clang -### -x hip --target=x86_64-linux-gnu \
19 // RUN: --offload=foo --offload=bar \
20 // RUN: --hip-path=%S/Inputs/hipspv -nogpuinc -nogpulib %s \
21 // RUN: 2>&1 | FileCheck --check-prefix=TOO-MANY-TARGETS %s
23 // TOO-MANY-TARGETS: error: only one offload target is supported
25 // RUN: not %clang -### -x hip --target=x86_64-linux-gnu -nogpuinc -nogpulib \
26 // RUN: --offload=amdgcn-amd-amdhsa --offload-arch=gfx900 %s \
27 // RUN: 2>&1 | FileCheck --check-prefix=OFFLOAD-ARCH-MIX %s
29 // OFFLOAD-ARCH-MIX: error: option '--offload-arch' cannot be specified with '--offload'