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 ee65ed0..870ccc8 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -113,8 +113,7 @@
/// 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 81152cc..0b121b4 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1302,8 +1302,8 @@
!C.getArgs().hasArg(options::OPT_save_temps) &&
isa<AssembleJobAction>(JA) &&
Inputs->size() == 1 && isa<CompileJobAction>(*Inputs->begin())) {
- const Tool &Compiler = TC->SelectTool(
- C, cast<JobAction>(**Inputs->begin()), (*Inputs)[0]->getInputs());
+ const Tool &Compiler =
+ TC->SelectTool(C, cast<JobAction>(**Inputs->begin()));
if (Compiler.hasIntegratedAssembler()) {
Inputs = &(*Inputs)[0]->getInputs();
ToolForJob = &Compiler;
@@ -1312,7 +1312,7 @@
// 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 ee439ba..c8038d1 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -176,8 +176,7 @@
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 @@
}
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 @@
}
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 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
}
}
-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 @@
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 @@
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 @@
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 @@
}
-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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 0419a37..ce2556f 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -123,8 +123,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 d0938c2..6d0d328 100644
--- a/lib/Driver/WindowsToolChain.cpp
+++ b/lib/Driver/WindowsToolChain.cpp
@@ -35,8 +35,7 @@
: 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;