From 30212ab363c0297e7b0ba77dddc0a20d6c54282c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 18 Mar 2013 18:19:46 +0000 Subject: [PATCH] Remove unused argument. llvm-svn: 177303 --- clang/include/clang/Driver/ToolChain.h | 2 +- clang/lib/Driver/Driver.cpp | 4 +-- clang/lib/Driver/ToolChains.cpp | 47 ++++++++++++++++------------------ clang/lib/Driver/ToolChains.h | 28 ++++++++++---------- clang/lib/Driver/WindowsToolChain.cpp | 2 +- 5 files changed, 40 insertions(+), 43 deletions(-) diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h index 78ca4d2..4a81bdc 100644 --- a/clang/include/clang/Driver/ToolChain.h +++ b/clang/include/clang/Driver/ToolChain.h @@ -114,7 +114,7 @@ public: /// SelectTool - Choose a tool to use to handle the action \p JA with the /// given \p Inputs. - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const = 0; + virtual Tool &SelectTool(const JobAction &JA) const = 0; // Helper methods diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index d250cb0..cc5b016 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1301,7 +1301,7 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC, isa(JA) && Inputs->size() == 1 && isa(*Inputs->begin())) { const Tool &Compiler = - TC->SelectTool(C, cast(**Inputs->begin())); + TC->SelectTool(cast(**Inputs->begin())); if (Compiler.hasIntegratedAssembler()) { Inputs = &(*Inputs)[0]->getInputs(); ToolForJob = &Compiler; @@ -1310,7 +1310,7 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC, // Otherwise use the tool for the current job. if (!ToolForJob) - ToolForJob = &TC->SelectTool(C, *JA); + ToolForJob = &TC->SelectTool(*JA); // See if we should use an integrated preprocessor. We do so when we have // exactly one input, since this is the only use case we care about diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index d9ecb2e..1ec477f 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -176,7 +176,7 @@ std::string Darwin::ComputeEffectiveClangTriple(const ArgList &Args, void Generic_ELF::anchor() {} -Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Darwin::SelectTool(const JobAction &JA) const { Action::ActionClass Key = JA.getKind(); if (getDriver().ShouldUseClangCompiler(JA)) { @@ -1382,8 +1382,7 @@ Generic_GCC::~Generic_GCC() { delete it->second; } -Tool &Generic_GCC::SelectTool(const Compilation &C, - const JobAction &JA) const { +Tool &Generic_GCC::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1552,8 +1551,7 @@ Hexagon_TC::~Hexagon_TC() { delete it->second; } -Tool &Hexagon_TC::SelectTool(const Compilation &C, - const JobAction &JA) const { +Tool &Hexagon_TC::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1697,8 +1695,7 @@ bool TCEToolChain::isPICDefaultForced() const { return false; } -Tool &TCEToolChain::SelectTool(const Compilation &C, - const JobAction &JA) const { +Tool &TCEToolChain::SelectTool(const JobAction &JA) const { Action::ActionClass Key; Key = Action::AnalyzeJobClass; @@ -1724,7 +1721,7 @@ OpenBSD::OpenBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Arg getFilePaths().push_back("/usr/lib"); } -Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &OpenBSD::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1744,7 +1741,7 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::openbsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -1759,7 +1756,7 @@ Bitrig::Bitrig(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) getFilePaths().push_back("/usr/lib"); } -Tool &Bitrig::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Bitrig::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1779,7 +1776,7 @@ Tool &Bitrig::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::bitrig::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -1846,7 +1843,7 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Arg getFilePaths().push_back(getDriver().SysRoot + "/usr/lib"); } -Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &FreeBSD::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1865,7 +1862,7 @@ Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::freebsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -1903,7 +1900,7 @@ NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) } } -Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &NetBSD::SelectTool( const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1923,7 +1920,7 @@ Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA) const { T = new tools::netbsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -1938,7 +1935,7 @@ Minix::Minix(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) getFilePaths().push_back("/usr/lib"); } -Tool &Minix::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Minix::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1953,7 +1950,7 @@ Tool &Minix::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::minix::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -1978,7 +1975,7 @@ AuroraUX::AuroraUX(const Driver &D, const llvm::Triple& Triple, } -Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &AuroraUX::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1993,7 +1990,7 @@ Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::auroraux::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -2014,7 +2011,7 @@ Solaris::Solaris(const Driver &D, const llvm::Triple& Triple, getFilePaths().push_back("/usr/lib"); } -Tool &Solaris::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Solaris::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2029,7 +2026,7 @@ Tool &Solaris::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::solaris::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -2402,7 +2399,7 @@ bool Linux::HasNativeLLVMSupport() const { return true; } -Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Linux::SelectTool( const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2421,7 +2418,7 @@ Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::linuxtools::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } @@ -2654,7 +2651,7 @@ DragonFly::DragonFly(const Driver &D, const llvm::Triple& Triple, const ArgList getFilePaths().push_back("/usr/lib/gcc41"); } -Tool &DragonFly::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &DragonFly::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2669,7 +2666,7 @@ Tool &DragonFly::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::LinkJobClass: T = new tools::dragonfly::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA); + T = &Generic_GCC::SelectTool(JA); } } diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index a2b4f2f..b8f469d 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -123,7 +123,7 @@ public: Generic_GCC(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); ~Generic_GCC(); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual bool IsUnwindTablesDefault() const; virtual bool isPICDefault() const; @@ -268,7 +268,7 @@ public: virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args, const char *BoundArch) const; - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual bool IsBlocksDefault() const { // Always allow blocks on Darwin; users interested in versioning are @@ -392,14 +392,14 @@ class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC { public: AuroraUX(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_GCC { public: Solaris(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool( const JobAction &JA) const; virtual bool IsIntegratedAssemblerDefault() const { return true; } }; @@ -412,7 +412,7 @@ public: virtual bool IsMathErrnoDefault() const { return false; } virtual bool IsObjCNonFragileABIDefault() const { return true; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Bitrig : public Generic_ELF { @@ -423,7 +423,7 @@ public: virtual bool IsObjCNonFragileABIDefault() const { return true; } virtual bool IsObjCLegacyDispatchDefault() const { return false; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -441,7 +441,7 @@ public: virtual bool IsMathErrnoDefault() const { return false; } virtual bool IsObjCNonFragileABIDefault() const { return true; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual bool UseSjLjExceptions() const; }; @@ -452,14 +452,14 @@ public: virtual bool IsMathErrnoDefault() const { return false; } virtual bool IsObjCNonFragileABIDefault() const { return true; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Minix : public Generic_ELF { public: Minix(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF { @@ -468,7 +468,7 @@ public: virtual bool IsMathErrnoDefault() const { return false; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { @@ -477,7 +477,7 @@ public: virtual bool HasNativeLLVMSupport() const; - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -511,7 +511,7 @@ public: const ArgList &Args); ~Hexagon_TC(); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -534,7 +534,7 @@ public: const ArgList &Args); ~TCEToolChain(); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; bool IsMathErrnoDefault() const; bool isPICDefault() const; bool isPICDefaultForced() const; @@ -550,7 +550,7 @@ class LLVM_LIBRARY_VISIBILITY Windows : public ToolChain { public: Windows(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + virtual Tool &SelectTool(const JobAction &JA) const; virtual bool IsIntegratedAssemblerDefault() const; virtual bool IsUnwindTablesDefault() const; diff --git a/clang/lib/Driver/WindowsToolChain.cpp b/clang/lib/Driver/WindowsToolChain.cpp index df4d72e..52d7e19 100644 --- a/clang/lib/Driver/WindowsToolChain.cpp +++ b/clang/lib/Driver/WindowsToolChain.cpp @@ -36,7 +36,7 @@ Windows::Windows(const Driver &D, const llvm::Triple& Triple, : ToolChain(D, Triple, Args) { } -Tool &Windows::SelectTool(const Compilation &C, const JobAction &JA) const { +Tool &Windows::SelectTool(const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; -- 2.7.4