[Driver] Gnu.cpp: remove unneeded getMultiarchTriple normalization

This commit is contained in:
Fangrui Song 2021-03-23 23:12:18 -07:00
parent 8796451d6e
commit 0361e64975
1 changed files with 1 additions and 5 deletions

View File

@ -3011,15 +3011,11 @@ Generic_GCC::addGCCLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
StringRef InstallDir = GCCInstallation.getInstallPath(); StringRef InstallDir = GCCInstallation.getInstallPath();
StringRef TripleStr = GCCInstallation.getTriple().str(); StringRef TripleStr = GCCInstallation.getTriple().str();
const Multilib &Multilib = GCCInstallation.getMultilib(); const Multilib &Multilib = GCCInstallation.getMultilib();
const std::string Triple = getMultiarchTriple(
getDriver(), GCCInstallation.getTriple(), getDriver().SysRoot);
const std::string TargetMultiarchTriple =
getMultiarchTriple(getDriver(), getTriple(), getDriver().SysRoot);
const GCCVersion &Version = GCCInstallation.getVersion(); const GCCVersion &Version = GCCInstallation.getVersion();
// Try /../$triple/include/c++/$version then /../include/c++/$version. // Try /../$triple/include/c++/$version then /../include/c++/$version.
if (addLibStdCXXIncludePaths( if (addLibStdCXXIncludePaths(
LibDir.str() + "/../" + Triple + "/include/c++/" + Version.Text, LibDir.str() + "/../" + TripleStr + "/include/c++/" + Version.Text,
TripleStr, Multilib.includeSuffix(), DriverArgs, CC1Args)) TripleStr, Multilib.includeSuffix(), DriverArgs, CC1Args))
return true; return true;
// Detect Debian g++-multiarch-incdir.diff. // Detect Debian g++-multiarch-incdir.diff.