Driver: Remove some unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108345 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index 2cec22a..11a153c 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -84,9 +84,8 @@
// Helper methods
- std::string GetFilePath(const Compilation &C, const char *Name) const;
- std::string GetProgramPath(const Compilation &C, const char *Name,
- bool WantFile = false) const;
+ std::string GetFilePath(const char *Name) const;
+ std::string GetProgramPath(const char *Name, bool WantFile = false) const;
// Platform defaults information
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 9b6264a..9fae67d 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -26,14 +26,11 @@
return Host.getDriver();
}
-std::string ToolChain::GetFilePath(const Compilation &C,
- const char *Name) const {
+std::string ToolChain::GetFilePath(const char *Name) const {
return Host.getDriver().GetFilePath(Name, *this);
}
-std::string ToolChain::GetProgramPath(const Compilation &C,
- const char *Name,
- bool WantFile) const {
+std::string ToolChain::GetProgramPath(const char *Name, bool WantFile) const {
return Host.getDriver().GetProgramPath(Name, *this, WantFile);
}
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e6465ac..1474499 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1490,7 +1490,7 @@
Args.AddAllArgs(CmdArgs, options::OPT_undef);
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "clang"));
+ Args.MakeArgString(getToolChain().GetProgramPath("clang"));
// Optionally embed the -cc1 level arguments into the debug info, for build
// analysis.
@@ -1590,7 +1590,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "clang"));
+ Args.MakeArgString(getToolChain().GetProgramPath("clang"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -1691,7 +1691,7 @@
const char *GCCName = getToolChain().getDriver().CCCGenericGCCName.c_str();
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, GCCName));
+ Args.MakeArgString(getToolChain().GetProgramPath(GCCName));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2098,7 +2098,7 @@
const char *CC1Name = getCC1Name(Inputs[0].getType());
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name));
+ Args.MakeArgString(getToolChain().GetProgramPath(CC1Name));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2198,7 +2198,7 @@
const char *CC1Name = getCC1Name(Inputs[0].getType());
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name));
+ Args.MakeArgString(getToolChain().GetProgramPath(CC1Name));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2253,7 +2253,7 @@
// asm_final spec is empty.
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
+ Args.MakeArgString(getToolChain().GetProgramPath("as"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2512,7 +2512,7 @@
Args.hasArg(options::OPT_shared_libgcc) &&
getDarwinToolChain().isMacosxVersionLT(10, 5)) {
const char *Str =
- Args.MakeArgString(getToolChain().GetFilePath(C, "crt3.o"));
+ Args.MakeArgString(getToolChain().GetFilePath("crt3.o"));
CmdArgs.push_back(Str);
}
}
@@ -2572,7 +2572,7 @@
Args.AddAllArgs(CmdArgs, options::OPT_F);
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("ld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2596,7 +2596,7 @@
CmdArgs.push_back(II.getFilename());
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "lipo"));
+ Args.MakeArgString(getToolChain().GetProgramPath("lipo"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2616,7 +2616,7 @@
CmdArgs.push_back(Output.getFilename());
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "dsymutil"));
+ Args.MakeArgString(getToolChain().GetProgramPath("dsymutil"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2646,7 +2646,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "gas"));
+ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2692,17 +2692,17 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crt1.o")));
+ getToolChain().GetFilePath("crt1.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crti.o")));
+ getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtbegin.o")));
+ getToolChain().GetFilePath("crtbegin.o")));
} else {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crti.o")));
+ getToolChain().GetFilePath("crti.o")));
}
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtn.o")));
+ getToolChain().GetFilePath("crtn.o")));
}
CmdArgs.push_back(Args.MakeArgString("-L/opt/gcc4/lib/gcc/"
@@ -2748,11 +2748,11 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared))
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtend.o")));
+ getToolChain().GetFilePath("crtend.o")));
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("ld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2782,7 +2782,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
+ Args.MakeArgString(getToolChain().GetProgramPath("as"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2827,12 +2827,12 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crt0.o")));
+ getToolChain().GetFilePath("crt0.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtbegin.o")));
+ getToolChain().GetFilePath("crtbegin.o")));
} else {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtbeginS.o")));
+ getToolChain().GetFilePath("crtbeginS.o")));
}
}
@@ -2881,14 +2881,14 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared))
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtend.o")));
+ getToolChain().GetFilePath("crtend.o")));
else
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtendS.o")));
+ getToolChain().GetFilePath("crtendS.o")));
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("ld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2930,7 +2930,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
+ Args.MakeArgString(getToolChain().GetProgramPath("as"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -2975,16 +2975,16 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crt1.o")));
+ getToolChain().GetFilePath("crt1.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crti.o")));
+ getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtbegin.o")));
+ getToolChain().GetFilePath("crtbegin.o")));
} else {
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crti.o")));
+ getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtbeginS.o")));
+ getToolChain().GetFilePath("crtbeginS.o")));
}
}
@@ -3044,17 +3044,17 @@
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared))
- CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C,
+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
"crtend.o")));
else
- CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C,
+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
"crtendS.o")));
- CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C,
+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
"crtn.o")));
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("ld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -3084,7 +3084,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "gas"));
+ Args.MakeArgString(getToolChain().GetProgramPath("gas"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -3108,7 +3108,7 @@
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nostartfiles))
- CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C,
+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
"/usr/gnu/lib/crtso.o")));
Args.AddAllArgs(CmdArgs, options::OPT_L);
@@ -3152,12 +3152,12 @@
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nostartfiles)) {
- CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C,
+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(
"/usr/gnu/lib/libend.a")));
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "/usr/gnu/bin/gld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("/usr/gnu/bin/gld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -3196,7 +3196,7 @@
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
+ Args.MakeArgString(getToolChain().GetProgramPath("as"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
@@ -3240,16 +3240,16 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath(C, "crt1.o")));
+ Args.MakeArgString(getToolChain().GetFilePath("crt1.o")));
CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
+ Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o")));
+ Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
} else {
CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
+ Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o")));
+ Args.MakeArgString(getToolChain().GetFilePath("crtbeginS.o")));
}
}
@@ -3320,15 +3320,15 @@
!Args.hasArg(options::OPT_nostartfiles)) {
if (!Args.hasArg(options::OPT_shared))
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtend.o")));
+ getToolChain().GetFilePath("crtend.o")));
else
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtendS.o")));
+ getToolChain().GetFilePath("crtendS.o")));
CmdArgs.push_back(Args.MakeArgString(
- getToolChain().GetFilePath(C, "crtn.o")));
+ getToolChain().GetFilePath("crtn.o")));
}
const char *Exec =
- Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
+ Args.MakeArgString(getToolChain().GetProgramPath("ld"));
Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
}