Skip to content

Commit 937aaea

Browse files
committed
[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 f886f7e but did not change the constructor to accurately represent its removal. This patch removes it from the interface entirely.
1 parent deef5b8 commit 937aaea

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
757757
auto &CudaTC = ToolChains[CudaTriple->str() + "/" + HostTriple.str()];
758758
if (!CudaTC) {
759759
CudaTC = std::make_unique<toolchains::CudaToolChain>(
760-
*this, *CudaTriple, *HostTC, C.getInputArgs(), OFK);
760+
*this, *CudaTriple, *HostTC, C.getInputArgs());
761761
}
762762
C.addOffloadDeviceToolChain(CudaTC.get(), OFK);
763763
} else if (IsHIP) {
@@ -874,7 +874,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
874874
if (!DeviceTC) {
875875
if (TT.isNVPTX())
876876
DeviceTC = std::make_unique<toolchains::CudaToolChain>(
877-
*this, TT, *HostTC, C.getInputArgs(), Action::OFK_OpenMP);
877+
*this, TT, *HostTC, C.getInputArgs());
878878
else if (TT.isAMDGCN())
879879
DeviceTC = std::make_unique<toolchains::AMDGPUOpenMPToolChain>(
880880
*this, TT, *HostTC, C.getInputArgs());

clang/lib/Driver/ToolChains/Cuda.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,7 @@ void NVPTX::getNVPTXTargetFeatures(const Driver &D, const llvm::Triple &Triple,
596596
/// together object files from the assembler into a single blob.
597597

598598
CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple,
599-
const ToolChain &HostTC, const ArgList &Args,
600-
const Action::OffloadKind OK)
599+
const ToolChain &HostTC, const ArgList &Args)
601600
: ToolChain(D, Triple, Args), HostTC(HostTC),
602601
CudaInstallation(D, HostTC.getTriple(), Args) {
603602
if (CudaInstallation.isValid()) {

clang/lib/Driver/ToolChains/Cuda.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ namespace toolchains {
123123
class LLVM_LIBRARY_VISIBILITY CudaToolChain : public ToolChain {
124124
public:
125125
CudaToolChain(const Driver &D, const llvm::Triple &Triple,
126-
const ToolChain &HostTC, const llvm::opt::ArgList &Args,
127-
const Action::OffloadKind OK);
126+
const ToolChain &HostTC, const llvm::opt::ArgList &Args);
128127

129128
const llvm::Triple *getAuxTriple() const override {
130129
return &HostTC.getTriple();

0 commit comments

Comments
 (0)