Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) (#3305)

This commit is contained in:
Fangrui Song 2020-01-31 17:52:35 -08:00 committed by GitHub
parent 97e0d978ee
commit 0a007a55f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 31 additions and 28 deletions

View file

@ -60,7 +60,7 @@ void addLibIfFound(std::vector<std::string> &args, const llvm::Twine &name) {
llvm::SmallString<128> candidate(dir);
llvm::sys::path::append(candidate, name);
if (llvm::sys::fs::exists(candidate)) {
args.push_back(candidate.str());
args.emplace_back(candidate.data(), candidate.size());
return;
}
}