aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringMapTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/StringMapTest.cpp')
-rw-r--r--llvm/unittests/ADT/StringMapTest.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
index 5f0c83d..fc82c27 100644
--- a/llvm/unittests/ADT/StringMapTest.cpp
+++ b/llvm/unittests/ADT/StringMapTest.cpp
@@ -224,9 +224,10 @@ TEST_F(StringMapTest, IterationTest) {
// Test StringMapEntry::Create() method.
TEST_F(StringMapTest, StringMapEntryTest) {
+ MallocAllocator Allocator;
StringMap<uint32_t>::value_type* entry =
StringMap<uint32_t>::value_type::Create(
- StringRef(testKeyFirst, testKeyLength), 1u);
+ StringRef(testKeyFirst, testKeyLength), Allocator, 1u);
EXPECT_STREQ(testKey, entry->first().data());
EXPECT_EQ(1u, entry->second);
free(entry);
@@ -353,14 +354,15 @@ TEST_F(StringMapTest, MoveOnly) {
StringMap<MoveOnly> t;
t.insert(std::make_pair("Test", MoveOnly(42)));
StringRef Key = "Test";
- StringMapEntry<MoveOnly>::Create(Key, MoveOnly(42))
- ->Destroy();
+ StringMapEntry<MoveOnly>::Create(Key, t.getAllocator(), MoveOnly(42))
+ ->Destroy(t.getAllocator());
}
TEST_F(StringMapTest, CtorArg) {
StringRef Key = "Test";
- StringMapEntry<MoveOnly>::Create(Key, Immovable())
- ->Destroy();
+ MallocAllocator Allocator;
+ StringMapEntry<MoveOnly>::Create(Key, Allocator, Immovable())
+ ->Destroy(Allocator);
}
TEST_F(StringMapTest, MoveConstruct) {