Adapt to llvm.org StringRef API change

This commit is contained in:
Fred Riss
2020-01-31 15:31:50 -08:00
committed by Michael Forster
parent 710799dd09
commit 259d78a350
99 changed files with 346 additions and 327 deletions

View File

@@ -142,7 +142,7 @@ static void getFunctionNames(std::vector<std::string> &Names) {
if (Token.empty()) {
break;
}
Names.push_back(Token);
Names.push_back(Token.str());
Buffer = NewBuffer;
}
}
@@ -153,12 +153,12 @@ static bool stringInSortedArray(
llvm::function_ref<bool(const std::string &, const std::string &)> &&cmp) {
if (list.empty())
return false;
auto iter = std::lower_bound(list.begin(), list.end(), str, cmp);
auto iter = std::lower_bound(list.begin(), list.end(), str.str(), cmp);
// If we didn't find str, return false.
if (list.end() == iter)
return false;
return !cmp(str, *iter);
return !cmp(str.str(), *iter);
}
void removeUnwantedFunctions(SILModule *M, ArrayRef<std::string> MangledNames,