From: Krasimir Georgiev Date: Thu, 25 Jul 2019 12:15:46 +0000 (+0000) Subject: Update some tests after r366702 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74ec8db202362c273b2664876fcb308773c16046;p=clang Update some tests after r366702 Summary: r366702 added a set of new clang-cl -- specific openmp flags together with tests. The way the newly added tests work is problematic: consider for example this asertion: ``` // RUN: %clang_cl --target=x86_64-windows-msvc /openmp -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CC1-OPENMP %s ... // CHECK-CC1-OPENMP: "-fopenmp" ``` It asserts that an `/openmp` flag should expand into `-fopenmp`. This however depends on the default value of Clang's CLANG_DEFAULT_OPENMP_RUNTIME value. Indeed, the code that adds `-fopenmp` to the output only does it if the default runtime is `libomp` or `libiomp5`, not when it is `libgomp`. I've updated the tests to not depend on the default value of this setting by specifying the runtime to use explicitly in each assertion. Reviewers: jdoerfert Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65272 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367012 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/fopenmp.c b/test/Driver/fopenmp.c index 20f583fffa..e505252ebc 100644 --- a/test/Driver/fopenmp.c +++ b/test/Driver/fopenmp.c @@ -13,9 +13,12 @@ // RUN: %clang -target x86_64-windows-gnu -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP // RUN: %clang -target x86_64-windows-gnu -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP // RUN: %clang -target x86_64-windows-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP -// RUN: %clang -target x86_64-windows-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP -// RUN: %clang_cl --target=x86_64-windows-msvc /openmp -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CC1-OPENMP %s -// RUN: %clang_cl --target=i686-windows-msvc /openmp:experimental -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CC1-OPENMP %s +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libomp /openmp -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libgomp /openmp -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libiomp5 /openmp -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libomp /openmp:experimental -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libgomp /openmp:experimental -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP +// RUN: %clang_cl --target=x86_64-windows-msvc /clang:-fopenmp=libiomp5 /openmp:experimental -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP // RUN: %clang_cl --target=x86_64-windows-msvc /openmp- -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CC1-NO-OPENMP %s // // CHECK-CC1-OPENMP: "-cc1"