[clang] Update remaining tests for usage of CLANG_RESOURCE_DIR (PR #202475)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 08:56:00 PDT 2026


================
@@ -2,50 +2,50 @@
 
 // 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 \
-// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,HIP %s
+// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,HIP -DRESOURCE_DIR=%clang-resource-dir %s
 
 // RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \
 // RUN:   -std=c++11 --rocm-path=%S/Inputs/rocm -nobuiltininc -nogpulib %s 2>&1 \
-// RUN:   | FileCheck -check-prefixes=COMMON,NOCLANG,HIP %s
+// RUN:   | FileCheck -check-prefixes=COMMON,NOCLANG,HIP -DRESOURCE_DIR=%clang-resource-dir %s
 
 // RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \
 // RUN:   -std=c++11 --rocm-path=%S/Inputs/rocm -nogpuinc -nogpulib %s 2>&1 \
-// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,NOHIP %s
+// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,NOHIP -DRESOURCE_DIR=%clang-resource-dir %s
 
 // RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \
 // RUN:   -std=c++11 --rocm-path=%S/Inputs/rocm --no-offload-inc -nogpulib --offload-inc %s 2>&1 \
-// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,HIP %s
+// RUN:   | FileCheck -check-prefixes=COMMON,CLANG,HIP -DRESOURCE_DIR=%clang-resource-dir %s
 
 // COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
-// CLANG-SAME: "-internal-isystem" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
-// NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include/cuda_wrappers"
+// CLANG-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include/cuda_wrappers"
+// NOCLANG-NOT: "[[RESOURCE_DIR]]/include/cuda_wrappers"
 // HIP-SAME: "-idirafter" "{{[^"]*}}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" "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include"
-// NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include"
+// CLANG-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOCLANG-NOT: [[RESOURCE_DIR]]/include"
----------------
dyung wrote:

Done

https://github.com/llvm/llvm-project/pull/202475


More information about the cfe-commits mailing list