[NFC][OpenMP] Use clang_cc1 to driver tests

The test driver-fopenmp-extensions.c is failing on platforms that does
not use integrated-as. It can be reproduced using -fno-integrated-as on
Linux too.

bin/clang -c -Xclang -verify=omp -fopenmp      -fopenmp-extensions
-fno-openmp-extensions
../llvm-project/clang/test/OpenMP/driver-fopenmp-extensions.c
-fno-integrated-as
Assembler messages:
Error: can't open /tmp/driver-fopenmp-extensions-8fafe8.s for reading:
No such file or directory
clang-14: error: assembler command failed with exit code 1 (use -v to
see invocation)

The goal of this test is to verify syntax diags only,
so we should use clang_cc1 to test.

Reviewed By: jdenny, ABataev

Differential Revision: https://reviews.llvm.org/D109255
This commit is contained in:
Jinsong Ji 2021-09-03 20:33:47 +00:00
parent 05cdd294ab
commit d364eccdd5
2 changed files with 26 additions and 26 deletions

View File

@ -1,26 +0,0 @@
// RUN: %clang -c -Xclang -verify=ompx -fopenmp %s
// RUN: %clang -c -Xclang -verify=ompx -fopenmp-simd %s
// RUN: %clang -c -Xclang -verify=ompx -fopenmp -fopenmp-extensions %s
// RUN: %clang -c -Xclang -verify=ompx -fopenmp-simd -fopenmp-extensions %s
// RUN: %clang -c -Xclang -verify=omp -fopenmp -fno-openmp-extensions %s
// RUN: %clang -c -Xclang -verify=omp -fopenmp-simd -fno-openmp-extensions %s
// RUN: %clang -c -Xclang -verify=omp -fopenmp \
// RUN: -fopenmp-extensions -fno-openmp-extensions %s
// RUN: %clang -c -Xclang -verify=omp -fopenmp-simd \
// RUN: -fopenmp-extensions -fno-openmp-extensions %s
// RUN: %clang -c -Xclang -verify=ompx -fopenmp \
// RUN: -fno-openmp-extensions -fopenmp-extensions %s
// RUN: %clang -c -Xclang -verify=ompx -fopenmp-simd \
// RUN: -fno-openmp-extensions -fopenmp-extensions %s
void foo() {
int x;
// ompx-no-diagnostics
// omp-error@+1 {{incorrect map type modifier}}
#pragma omp target map(ompx_hold, alloc: x)
;
}

View File

@ -0,0 +1,26 @@
// RUN: %clang_cc1 -verify=ompx -fopenmp %s
// RUN: %clang_cc1 -verify=ompx -fopenmp-simd %s
// RUN: %clang_cc1 -verify=ompx -fopenmp -fopenmp-extensions %s
// RUN: %clang_cc1 -verify=ompx -fopenmp-simd -fopenmp-extensions %s
// RUN: %clang_cc1 -verify=omp -fopenmp -fno-openmp-extensions %s
// RUN: %clang_cc1 -verify=omp -fopenmp-simd -fno-openmp-extensions %s
// RUN: %clang_cc1 -verify=omp -fopenmp \
// RUN: -fopenmp-extensions -fno-openmp-extensions %s
// RUN: %clang_cc1 -verify=omp -fopenmp-simd \
// RUN: -fopenmp-extensions -fno-openmp-extensions %s
// RUN: %clang_cc1 -verify=ompx -fopenmp \
// RUN: -fno-openmp-extensions -fopenmp-extensions %s
// RUN: %clang_cc1 -verify=ompx -fopenmp-simd \
// RUN: -fno-openmp-extensions -fopenmp-extensions %s
void foo() {
int x;
// ompx-no-diagnostics
// omp-error@+1 {{incorrect map type modifier}}
#pragma omp target map(ompx_hold, alloc: x)
;
}