Fix build breaks for master-next against llvm.org.

StringRef conversion to std::string needs to be explicit now.
This commit is contained in:
Michael Forster
2020-03-04 14:43:49 +01:00
parent e92599fa63
commit 32d2b1486c
5 changed files with 10 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ struct Tester {
// Performs an insert operation and tests that the result matches what
// we get from the std::map.
void insert(StringRef key, int value) {
auto stdmapResult = StdMap.insert({key, value});
auto stdmapResult = StdMap.insert({key.str(), value});
auto premapResult = PreMap.insert(asArray(key), value);
// Whether or not we modified the map should be the same in both
@@ -57,7 +57,7 @@ struct Tester {
// Tests that the result of a findPrefix matches what we expect from
// the std::map.
void find(StringRef key) {
auto stdmapResult = StdMap.lower_bound(key);
auto stdmapResult = StdMap.lower_bound(key.str());
while (stdmapResult == StdMap.end() ||
!key.startswith(stdmapResult->first)) {
if (stdmapResult == StdMap.begin()) {