diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-06-11 05:35:56 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-06-11 05:35:56 +0000 |
commit | 27be15cd36dda4410e1cef30beac9924bc8b6a99 (patch) | |
tree | afe0c5ea6a5946d49b154677ade4c3b3053fb5f4 /unittests | |
parent | e12b0bbc023c2a204bae1b86ed548afa6fc6645f (diff) | |
download | llvm-27be15cd36dda4410e1cef30beac9924bc8b6a99.tar.gz llvm-27be15cd36dda4410e1cef30beac9924bc8b6a99.tar.bz2 llvm-27be15cd36dda4410e1cef30beac9924bc8b6a99.tar.xz |
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
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/StringMapTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/ADT/StringMapTest.cpp b/unittests/ADT/StringMapTest.cpp index de18e07f38..70eec873ed 100644 --- a/unittests/ADT/StringMapTest.cpp +++ b/unittests/ADT/StringMapTest.cpp @@ -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(); } |