From: Rafael Espindola Date: Mon, 18 Mar 2013 17:25:58 +0000 (+0000) Subject: Remove unused argument. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5dce308870cd7d6b5156640af3724433bc1c575;p=clang Remove unused argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177293 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index ee65ed0849..870ccc874e 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -113,8 +113,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 ActionList &Inputs) const = 0; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const = 0; // Helper methods diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 81152cc96b..0b121b4089 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1302,8 +1302,8 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC, !C.getArgs().hasArg(options::OPT_save_temps) && isa(JA) && Inputs->size() == 1 && isa(*Inputs->begin())) { - const Tool &Compiler = TC->SelectTool( - C, cast(**Inputs->begin()), (*Inputs)[0]->getInputs()); + const Tool &Compiler = + TC->SelectTool(C, cast(**Inputs->begin())); if (Compiler.hasIntegratedAssembler()) { Inputs = &(*Inputs)[0]->getInputs(); ToolForJob = &Compiler; @@ -1312,7 +1312,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, *Inputs); + ToolForJob = &TC->SelectTool(C, *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/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index ee439ba532..c8038d1888 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -176,8 +176,7 @@ std::string Darwin::ComputeEffectiveClangTriple(const ArgList &Args, void Generic_ELF::anchor() {} -Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const { +Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key = JA.getKind(); if (getDriver().ShouldUseClangCompiler(JA)) { @@ -1387,8 +1386,7 @@ Generic_GCC::~Generic_GCC() { } Tool &Generic_GCC::SelectTool(const Compilation &C, - const JobAction &JA, - const ActionList &Inputs) const { + const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1558,21 +1556,12 @@ Hexagon_TC::~Hexagon_TC() { } Tool &Hexagon_TC::SelectTool(const Compilation &C, - const JobAction &JA, - const ActionList &Inputs) const { + const JobAction &JA) const { Action::ActionClass Key; - // if (JA.getKind () == Action::CompileJobClass) - // Key = JA.getKind (); - // else - if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; else Key = JA.getKind(); - // if ((JA.getKind () == Action::CompileJobClass) - // && (JA.getType () != types::TY_LTO_BC)) { - // Key = JA.getKind (); - // } Tool *&T = Tools[Key]; if (!T) { @@ -1711,8 +1700,7 @@ bool TCEToolChain::isPICDefaultForced() const { } Tool &TCEToolChain::SelectTool(const Compilation &C, - const JobAction &JA, - const ActionList &Inputs) const { + const JobAction &JA) const { Action::ActionClass Key; Key = Action::AnalyzeJobClass; @@ -1738,8 +1726,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 ActionList &Inputs) const { +Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1763,7 +1750,7 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::openbsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -1778,8 +1765,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 ActionList &Inputs) const { +Tool &Bitrig::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1803,7 +1789,7 @@ Tool &Bitrig::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::bitrig::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -1870,8 +1856,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 ActionList &Inputs) const { +Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1894,7 +1879,7 @@ Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::freebsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -1932,8 +1917,7 @@ NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) } } -Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const { +Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1957,7 +1941,7 @@ Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA, T = new tools::netbsd::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -1972,8 +1956,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 ActionList &Inputs) const { +Tool &Minix::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -1988,7 +1971,7 @@ Tool &Minix::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::minix::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -2013,8 +1996,7 @@ AuroraUX::AuroraUX(const Driver &D, const llvm::Triple& Triple, } -Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const { +Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2029,7 +2011,7 @@ Tool &AuroraUX::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::auroraux::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -2050,8 +2032,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 ActionList &Inputs) const { +Tool &Solaris::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2066,7 +2047,7 @@ Tool &Solaris::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::solaris::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -2439,8 +2420,7 @@ bool Linux::HasNativeLLVMSupport() const { return true; } -Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const { +Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2463,7 +2443,7 @@ Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::linuxtools::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } @@ -2696,8 +2676,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 ActionList &Inputs) const { +Tool &DragonFly::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass; @@ -2712,7 +2691,7 @@ Tool &DragonFly::SelectTool(const Compilation &C, const JobAction &JA, case Action::LinkJobClass: T = new tools::dragonfly::Link(*this); break; default: - T = &Generic_GCC::SelectTool(C, JA, Inputs); + T = &Generic_GCC::SelectTool(C, JA); } } diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index 0419a375ea..ce2556f818 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -123,8 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual bool IsUnwindTablesDefault() const; virtual bool isPICDefault() const; @@ -269,8 +268,7 @@ public: virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args, const char *BoundArch) const; - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual bool IsBlocksDefault() const { // Always allow blocks on Darwin; users interested in versioning are @@ -394,16 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, 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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual bool IsIntegratedAssemblerDefault() const { return true; } }; @@ -416,8 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Bitrig : public Generic_ELF { @@ -428,8 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -447,8 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual bool UseSjLjExceptions() const; }; @@ -459,16 +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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, 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 ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF { @@ -477,8 +468,7 @@ public: virtual bool IsMathErrnoDefault() const { return false; } - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { @@ -487,8 +477,7 @@ public: virtual bool HasNativeLLVMSupport() const; - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -522,8 +511,7 @@ public: const ArgList &Args); ~Hexagon_TC(); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const; @@ -545,8 +533,7 @@ public: TCEToolChain(const Driver &D, const llvm::Triple& Triple); ~TCEToolChain(); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; bool IsMathErrnoDefault() const; bool isPICDefault() const; bool isPICDefaultForced() const; @@ -562,8 +549,7 @@ class LLVM_LIBRARY_VISIBILITY Windows : public ToolChain { public: Windows(const Driver &D, const llvm::Triple& Triple); - virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; virtual bool IsIntegratedAssemblerDefault() const; virtual bool IsUnwindTablesDefault() const; diff --git a/lib/Driver/WindowsToolChain.cpp b/lib/Driver/WindowsToolChain.cpp index d0938c2686..6d0d3283ac 100644 --- a/lib/Driver/WindowsToolChain.cpp +++ b/lib/Driver/WindowsToolChain.cpp @@ -35,8 +35,7 @@ Windows::Windows(const Driver &D, const llvm::Triple& Triple) : ToolChain(D, Triple) { } -Tool &Windows::SelectTool(const Compilation &C, const JobAction &JA, - const ActionList &Inputs) const { +Tool &Windows::SelectTool(const Compilation &C, const JobAction &JA) const { Action::ActionClass Key; if (getDriver().ShouldUseClangCompiler(JA)) Key = Action::AnalyzeJobClass;