summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-06-11 05:35:56 +0000
committerCraig Topper <craig.topper@gmail.com>2014-06-11 05:35:56 +0000
commit213d2f79e5082290c318f2c8498664bb81f7e06b (patch)
treed6dc3fde2277ff8104ef6de42396485d6c6bc285 /llvm/unittests
parent6a729c64e0eb168e26f6377002b884f748d48333 (diff)
downloadbcm5719-llvm-213d2f79e5082290c318f2c8498664bb81f7e06b.tar.gz
bcm5719-llvm-213d2f79e5082290c318f2c8498664bb81f7e06b.zip
Convert StringMapEntry::Create to use StringRef instead of start/end pointers. Simpliies all in tree call sites. No functional change.
llvm-svn: 210638
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/ADT/StringMapTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
index de18e07f386..70eec873ed2 100644
--- a/llvm/unittests/ADT/StringMapTest.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud