diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index e358c4e04dc..15a461e4691 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -1498,11 +1498,12 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const { namespace { // Filter to remove Multilibs that don't exist as a suffix to Path -class FilterNonExistent : public MultilibSet::FilterCallback { - std::string Base; +class FilterNonExistent { + StringRef Base; + public: - FilterNonExistent(std::string Base) : Base(Base) {} - bool operator()(const Multilib &M) const override { + FilterNonExistent(StringRef Base) : Base(Base) {} + bool operator()(const Multilib &M) { return !llvm::sys::fs::exists(Base + M.gccSuffix() + "/crtbegin.o"); } }; @@ -3171,7 +3172,7 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, // Add include directories specific to the selected multilib set and multilib. if (GCCInstallation.isValid()) { - auto Callback = Multilibs.includeDirsCallback(); + const auto &Callback = Multilibs.includeDirsCallback(); if (Callback) { const auto IncludePaths = Callback(GCCInstallation.getInstallPath(), GCCInstallation.getTriple().str(), |

