mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix build breaks for master-next against llvm.org.
StringRef conversion to std::string needs to be explicit now.
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user