[lld] Replace SmallStr.str().str() with std::string conversion operator.

Use the std::string conversion operator introduced in
d7049213d0.
This commit is contained in:
Jonas Devlieghere 2020-01-29 21:30:21 -08:00
parent 509e21a1b9
commit 3e24242a7d
4 changed files with 4 additions and 4 deletions

View File

@ -1095,7 +1095,7 @@ Optional<std::string> getReproduceFile(const opt::InputArgList &args) {
if (auto *arg = args.getLastArg(OPT_linkrepro)) {
SmallString<64> path = StringRef(arg->getValue());
sys::path::append(path, "repro.tar");
return path.str().str();
return std::string(path);
}
return None;

View File

@ -212,7 +212,7 @@ static Optional<std::string> findFile(StringRef path1, const Twine &path2) {
path::append(s, path1, path2);
if (fs::exists(s))
return s.str().str();
return std::string(s);
return None;
}

View File

@ -114,7 +114,7 @@ static Optional<std::string> findFile(StringRef path1, const Twine &path2) {
SmallString<128> s;
sys::path::append(s, path1, path2);
if (sys::fs::exists(s))
return s.str().str();
return std::string(s);
return None;
}

View File

@ -154,7 +154,7 @@ static Optional<std::string> findFile(StringRef path1, const Twine &path2) {
SmallString<128> s;
path::append(s, path1, path2);
if (fs::exists(s))
return s.str().str();
return std::string(s);
return None;
}