Convert StringMapEntry::Create to use StringRef instead of start/end pointers. Simpliies all in tree call sites. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-06-11 05:35:56 +00:00
parent e12b0bbc02
commit 27be15cd36
4 changed files with 15 additions and 18 deletions

View File

@ -187,7 +187,7 @@ TEST_F(StringMapTest, IterationTest) {
TEST_F(StringMapTest, StringMapEntryTest) {
StringMap<uint32_t>::value_type* entry =
StringMap<uint32_t>::value_type::Create(
testKeyFirst, testKeyFirst + testKeyLength, 1u);
StringRef(testKeyFirst, testKeyLength), 1u);
EXPECT_STREQ(testKey, entry->first().data());
EXPECT_EQ(1u, entry->second);
free(entry);
@ -198,7 +198,7 @@ TEST_F(StringMapTest, InsertTest) {
SCOPED_TRACE("InsertTest");
testMap.insert(
StringMap<uint32_t>::value_type::Create(
testKeyFirst, testKeyFirst + testKeyLength,
StringRef(testKeyFirst, testKeyLength),
testMap.getAllocator(), 1u));
assertSingleItemMap();
}
@ -236,7 +236,7 @@ TEST_F(StringMapTest, MoveOnlyKey) {
StringMap<MoveOnly> t;
t.GetOrCreateValue("Test", MoveOnly(42));
StringRef Key = "Test";
StringMapEntry<MoveOnly>::Create(Key.begin(), Key.end(), MoveOnly(42))
StringMapEntry<MoveOnly>::Create(Key, MoveOnly(42))
->Destroy();
}