More explicit StringRef -> std::string conversions

On the older compiler/stdlib used by our Ubuntu 16.04 bots, the
construction

        std::pair<std::string, X>(StringRef, X)

fails unless you call `.str()`. Newer compilers/stdlib treat this as an
explicit construction, which is what is now needed on master-next, so it
only fails on Ubuntu 16.04.

rdar://60514063
This commit is contained in:
Ben Langmuir
2020-03-18 09:50:56 -07:00
parent 9e2d7ca053
commit a46b35b5ca
3 changed files with 3 additions and 3 deletions

View File

@@ -178,7 +178,7 @@ std::vector<const Job *> ModuleDepGraph::jobsContaining(
void ModuleDepGraph::registerJob(const Job *job) {
// No need to create any nodes; that will happen when the swiftdeps file is
// read. Just record the correspondence.
jobsBySwiftDeps.insert(std::make_pair(getSwiftDeps(job), job));
jobsBySwiftDeps.insert(std::make_pair(getSwiftDeps(job).str(), job));
}
std::vector<const Job *> ModuleDepGraph::getAllJobs() const {