Author: Joseph Huber Date: 2022-08-26T15:28:34-05:00 New Revision: 937aaead87f055caa4d91d7ba637d442a94a24a6
URL: https://github.com/llvm/llvm-project/commit/937aaead87f055caa4d91d7ba637d442a94a24a6 DIFF: https://github.com/llvm/llvm-project/commit/937aaead87f055caa4d91d7ba637d442a94a24a6.diff LOG: [CUDA] Fix arguments after removing unused private variable Summary: A previous patch removed the use of the `OK` private variable in CUDA which resulted in usused variable warnings. this was fixed in f886f7e8ef7aa4f54298db792a656373af90440c but did not change the constructor to accurately represent its removal. This patch removes it from the interface entirely. Added: Modified: clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/Cuda.h Removed: ################################################################################ diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index bca88e96da6f..d23a8931a8a8 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -757,7 +757,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, auto &CudaTC = ToolChains[CudaTriple->str() + "/" + HostTriple.str()]; if (!CudaTC) { CudaTC = std::make_unique<toolchains::CudaToolChain>( - *this, *CudaTriple, *HostTC, C.getInputArgs(), OFK); + *this, *CudaTriple, *HostTC, C.getInputArgs()); } C.addOffloadDeviceToolChain(CudaTC.get(), OFK); } else if (IsHIP) { @@ -874,7 +874,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, if (!DeviceTC) { if (TT.isNVPTX()) DeviceTC = std::make_unique<toolchains::CudaToolChain>( - *this, TT, *HostTC, C.getInputArgs(), Action::OFK_OpenMP); + *this, TT, *HostTC, C.getInputArgs()); else if (TT.isAMDGCN()) DeviceTC = std::make_unique<toolchains::AMDGPUOpenMPToolChain>( *this, TT, *HostTC, C.getInputArgs()); diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp index 4d9a473419d3..84a12bd4a144 100644 --- a/clang/lib/Driver/ToolChains/Cuda.cpp +++ b/clang/lib/Driver/ToolChains/Cuda.cpp @@ -596,8 +596,7 @@ void NVPTX::getNVPTXTargetFeatures(const Driver &D, const llvm::Triple &Triple, /// together object files from the assembler into a single blob. CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple, - const ToolChain &HostTC, const ArgList &Args, - const Action::OffloadKind OK) + const ToolChain &HostTC, const ArgList &Args) : ToolChain(D, Triple, Args), HostTC(HostTC), CudaInstallation(D, HostTC.getTriple(), Args) { if (CudaInstallation.isValid()) { diff --git a/clang/lib/Driver/ToolChains/Cuda.h b/clang/lib/Driver/ToolChains/Cuda.h index a51dcc2d5a20..c073a9abceb9 100644 --- a/clang/lib/Driver/ToolChains/Cuda.h +++ b/clang/lib/Driver/ToolChains/Cuda.h @@ -123,8 +123,7 @@ namespace toolchains { class LLVM_LIBRARY_VISIBILITY CudaToolChain : public ToolChain { public: CudaToolChain(const Driver &D, const llvm::Triple &Triple, - const ToolChain &HostTC, const llvm::opt::ArgList &Args, - const Action::OffloadKind OK); + const ToolChain &HostTC, const llvm::opt::ArgList &Args); const llvm::Triple *getAuxTriple() const override { return &HostTC.getTriple(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits