[clang] a3b3f7e - [HIP] Adjust check in hip-include-path.hip test case

Bjorn Pettersson via cfe-commits cfe-commits at lists.llvm.org
Wed May 26 02:08:46 PDT 2021


Author: Bjorn Pettersson
Date: 2021-05-26T11:08:05+02:00
New Revision: a3b3f7e631981bd861d5fe5e20f33b11a0dac978

URL: https://github.com/llvm/llvm-project/commit/a3b3f7e631981bd861d5fe5e20f33b11a0dac978
DIFF: https://github.com/llvm/llvm-project/commit/a3b3f7e631981bd861d5fe5e20f33b11a0dac978.diff

LOG: [HIP] Adjust check in hip-include-path.hip test case

The changes in commit 722c39fef5ab6 caused the test case to fail
when building with -DLLVM_LIBDIR_SUFFIX=64. This patch makes the
checks a bit more relaxed to support libdir suffixes again.

Also adjusting the regular expressions to avoid mathes including
double quotes.

Added: 
    

Modified: 
    clang/test/Driver/hip-include-path.hip

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/hip-include-path.hip b/clang/test/Driver/hip-include-path.hip
index 4e15e28fb2767..7c728a4c95fd6 100644
--- a/clang/test/Driver/hip-include-path.hip
+++ b/clang/test/Driver/hip-include-path.hip
@@ -19,26 +19,26 @@
 // COMMON: InstalledDir: [[ROOT:[^"]*]]/bin
 
 // COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
-// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{.*}}/include/cuda_wrappers"
-// NOCLANG-NOT: "[[ROOT]]/lib/clang/{{.*}}/include/cuda_wrappers"
-// HIP-SAME: "-internal-isystem" "{{.*}}Inputs/rocm/include"
+// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// NOCLANG-NOT: "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// HIP-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include"
 // NOHIP-NOT: "{{.*}}Inputs/rocm/include"
 // HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h"
 // NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h"
 // skip check of standard C++ include path
-// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{.*}}/include"
-// NOCLANG-NOT: "[[ROOT]]/lib/clang/{{.*}}/include"
+// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include"
+// NOCLANG-NOT: "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include"
 
 // COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
-// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{.*}}/include/cuda_wrappers"
-// NOCLANG-NOT: "[[ROOT]]/lib/clang/{{.*}}/include/cuda_wrappers"
-// HIP-SAME: "-internal-isystem" "{{.*}}Inputs/rocm/include"
+// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// NOCLANG-NOT: "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// HIP-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include"
 // NOHIP-NOT: "{{.*}}Inputs/rocm/include"
 // HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h"
 // NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h"
 // skip check of standard C++ include path
-// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{.*}}/include"
-// NOCLANG-NOT: "[[ROOT]]/lib/clang/{{.*}}/include"
+// CLANG-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include"
+// NOCLANG-NOT: "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include"
 
 // RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \
 // RUN:   -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \
@@ -47,9 +47,9 @@
 // ROCM35: InstalledDir: [[ROOT:[^"]*]]/bin
 
 // ROCM35-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
-// ROCM35-NOT: "[[ROOT]]/lib/clang/{{.*}}/include/cuda_wrappers"
-// ROCM35-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{[^"]*}}"
+// ROCM35-NOT: "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// ROCM35-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}"
 // ROCM35-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include"
 // ROCM35-NOT: "-include" "__clang_hip_runtime_wrapper.h"
 // skip check of standard C++ include path
-// ROCM35-SAME: "-internal-isystem" "[[ROOT]]/lib/clang/{{.*}}/include"
+// ROCM35-SAME: "-internal-isystem" "[[ROOT]]/lib{{[^"]*}}/clang/{{[^"]*}}/include"


        


More information about the cfe-commits mailing list