[clang] 6f5a159 - [clang][driver] Clean up unnecessary reference to TC. NFC.
Michael Liao via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 6 12:15:45 PST 2020
Author: Michael Liao
Date: 2020-02-06T15:14:21-05:00
New Revision: 6f5a159eab8d3fecdbbc741a38c970c0149b3c96
URL: https://github.com/llvm/llvm-project/commit/6f5a159eab8d3fecdbbc741a38c970c0149b3c96
DIFF: https://github.com/llvm/llvm-project/commit/6f5a159eab8d3fecdbbc741a38c970c0149b3c96.diff
LOG: [clang][driver] Clean up unnecessary reference to TC. NFC.
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 37adad152c56..65039ac64b5a 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -307,10 +307,9 @@ static void getWebAssemblyTargetFeatures(const ArgList &Args,
handleTargetFeaturesGroup(Args, Features, options::OPT_m_wasm_Features_Group);
}
-static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
+static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
const ArgList &Args, ArgStringList &CmdArgs,
bool ForAS, bool IsAux = false) {
- const Driver &D = TC.getDriver();
std::vector<StringRef> Features;
switch (Triple.getArch()) {
default:
@@ -1594,7 +1593,7 @@ void Clang::RenderTargetOptions(const llvm::Triple &EffectiveTriple,
const ToolChain &TC = getToolChain();
// Add the target features
- getTargetFeatures(TC, EffectiveTriple, Args, CmdArgs, false);
+ getTargetFeatures(TC.getDriver(), EffectiveTriple, Args, CmdArgs, false);
// Add target specific flags.
switch (TC.getArch()) {
@@ -4643,7 +4642,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-aux-target-cpu");
CmdArgs.push_back(Args.MakeArgString(HostCPU));
}
- getTargetFeatures(TC, *TC.getAuxTriple(), HostArgs, CmdArgs,
+ getTargetFeatures(D, *TC.getAuxTriple(), HostArgs, CmdArgs,
/*ForAS*/ false, /*IsAux*/ true);
}
@@ -6679,7 +6678,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
}
// Add the target features
- getTargetFeatures(getToolChain(), Triple, Args, CmdArgs, true);
+ getTargetFeatures(D, Triple, Args, CmdArgs, true);
// Ignore explicit -force_cpusubtype_ALL option.
(void)Args.hasArg(options::OPT_force__cpusubtype__ALL);
More information about the cfe-commits
mailing list