From: Joseph Huber Date: Mon, 3 Apr 2023 21:53:41 +0000 (-0500) Subject: [Clang] Fix failing test on windows and add TODO for gpu headers X-Git-Tag: upstream/17.0.6~12811 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d78ceeba986b5ebe83f935175e584c346a52b8a3;p=platform%2Fupstream%2Fllvm.git [Clang] Fix failing test on windows and add TODO for gpu headers Summary: This test failed because of the path separators on Windows. Also this was a good excuse to add an extra TODO that @tra wanted. --- diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index a17db9b..6523883 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -1166,8 +1166,9 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, getToolChain().getTriple().isAMDGCN())) { // Add include/gpu-none-libc/* to our system include path. This lets us use - // GPU-specific system headers first. These headers should be made to be - // compatible with the host environment's headers. + // GPU-specific system headers first. + // TODO: We need to find a way to make these headers compatible with the + // host environment. SmallString<128> P(llvm::sys::path::parent_path(D.InstalledDir)); llvm::sys::path::append(P, "include"); llvm::sys::path::append(P, "gpu-none-llvm"); diff --git a/clang/test/Driver/gpu-libc-headers.c b/clang/test/Driver/gpu-libc-headers.c index c8f772f..9437d3e 100644 --- a/clang/test/Driver/gpu-libc-headers.c +++ b/clang/test/Driver/gpu-libc-headers.c @@ -11,7 +11,7 @@ // RUN: FileCheck %s --check-prefix=CHECK-HEADERS // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -nogpulib --sysroot=./ %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-HEADERS -// CHECK-HEADERS: "-cc1"{{.*}}"-c-isystem" "{{.*}}include/gpu-none-llvm"{{.*}}"-isysroot" "./" +// CHECK-HEADERS: "-cc1"{{.*}}"-c-isystem" "{{.*}}include{{.*}}gpu-none-llvm"{{.*}}"-isysroot" "./" // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -nogpulib \ // RUN: -nogpuinc %s 2>&1 | FileCheck %s --check-prefix=CHECK-HEADERS-DISABLED @@ -19,4 +19,4 @@ // RUN: -nostdinc %s 2>&1 | FileCheck %s --check-prefix=CHECK-HEADERS-DISABLED // RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -nogpulib \ // RUN: -nobuiltininc %s 2>&1 | FileCheck %s --check-prefix=CHECK-HEADERS-DISABLED -// CHECK-HEADERS-DISABLED-NOT: "-cc1"{{.*}}"-c-isystem" "{{.*}}include/gpu-none-llvm" +// CHECK-HEADERS-DISABLED-NOT: "-cc1"{{.*}}"-c-isystem" "{{.*}}include{{.*}}gpu-none-llvm"