diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2016-05-19 15:07:00 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2016-05-19 15:07:00 +0000 |
| commit | c69d28162b36b008da283e1c96f3efe4dfa295d6 (patch) | |
| tree | 4268a57b88246a4accb15b2e40f9f88acc35e034 /clang/lib/Driver/ToolChains.cpp | |
| parent | d9fc3f030a8ada78c6b6f9f8b31dc4fa97f2a3b8 (diff) | |
| download | bcm5719-llvm-c69d28162b36b008da283e1c96f3efe4dfa295d6.tar.gz bcm5719-llvm-c69d28162b36b008da283e1c96f3efe4dfa295d6.zip | |
[driver] Do not pass target triple to the MultilibSet include dirs callback
No one callback uses target triple so we can escape passing the unused
argument.
llvm-svn: 270068
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 3ec013c3473..1a1c0f86cff 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1924,7 +1924,7 @@ static bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, .FilterOut(".*sof/nan2008") .FilterOut(NonExistent) .setIncludeDirsCallback([](StringRef InstallDir, - StringRef TripleStr, const Multilib &M) { + const Multilib &M) { std::vector<std::string> Dirs; Dirs.push_back((InstallDir + "/include").str()); std::string SysRootInc = @@ -1954,8 +1954,8 @@ static bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, MuslMipsMultilibs = MultilibSet().Either(MArchMipsR2, MArchMipselR2); // Specify the callback that computes the include directories. - MuslMipsMultilibs.setIncludeDirsCallback([]( - StringRef InstallDir, StringRef TripleStr, const Multilib &M) { + MuslMipsMultilibs.setIncludeDirsCallback([](StringRef InstallDir, + const Multilib &M) { std::vector<std::string> Dirs; Dirs.push_back( (InstallDir + "/../sysroot" + M.osSuffix() + "/usr/include").str()); @@ -2007,7 +2007,7 @@ static bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, .FilterOut("/micromips.*/64") .FilterOut(NonExistent) .setIncludeDirsCallback([](StringRef InstallDir, - StringRef TripleStr, const Multilib &M) { + const Multilib &M) { std::vector<std::string> Dirs; Dirs.push_back((InstallDir + "/include").str()); std::string SysRootInc = @@ -2060,7 +2060,7 @@ static bool findMIPSMultilibs(const Driver &D, const llvm::Triple &TargetTriple, .Maybe(LittleEndian) .FilterOut(NonExistent) .setIncludeDirsCallback([](StringRef InstallDir, - StringRef TripleStr, const Multilib &M) { + const Multilib &M) { std::vector<std::string> Dirs; Dirs.push_back((InstallDir + "/include").str()); Dirs.push_back( @@ -2540,8 +2540,7 @@ void MipsLLVMToolChain::AddClangSystemIncludeArgs( const auto &Callback = Multilibs.includeDirsCallback(); if (Callback) { - const auto IncludePaths = - Callback(D.getInstalledDir(), getTripleString(), SelectedMultilib); + const auto IncludePaths = Callback(D.getInstalledDir(), SelectedMultilib); for (const auto &Path : IncludePaths) addExternCSystemIncludeIfExists(DriverArgs, CC1Args, Path); } @@ -2588,8 +2587,8 @@ void MipsLLVMToolChain::AddClangCXXStdlibIncludeArgs( const auto &Callback = Multilibs.includeDirsCallback(); if (Callback) { - const auto IncludePaths = Callback(getDriver().getInstalledDir(), - getTripleString(), SelectedMultilib); + const auto IncludePaths = + Callback(getDriver().getInstalledDir(), SelectedMultilib); for (const auto &Path : IncludePaths) { if (llvm::sys::fs::exists(Path + "/c++/v1")) { addSystemInclude(DriverArgs, CC1Args, Path + "/c++/v1"); @@ -3971,7 +3970,6 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, const auto &Callback = Multilibs.includeDirsCallback(); if (Callback) { const auto IncludePaths = Callback(GCCInstallation.getInstallPath(), - GCCInstallation.getTriple().str(), GCCInstallation.getMultilib()); for (const auto &Path : IncludePaths) addExternCSystemIncludeIfExists(DriverArgs, CC1Args, Path); |

