aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringMapTest.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2020-05-02 15:59:10 +0200
committerBenjamin Kramer <benny.kra@googlemail.com>2020-05-02 16:08:46 +0200
commitd3bc86c2ed579c3b854d37c114a85901ed8cfb9a (patch)
treea8d87c895a4d19479a6875f5a73ada9aaa05f81b /llvm/unittests/ADT/StringMapTest.cpp
parentfe4245a4c1c2051adeeac7007be33bb0558143cf (diff)
downloadllvm-d3bc86c2ed579c3b854d37c114a85901ed8cfb9a.zip
llvm-d3bc86c2ed579c3b854d37c114a85901ed8cfb9a.tar.gz
llvm-d3bc86c2ed579c3b854d37c114a85901ed8cfb9a.tar.bz2
[Allocator] Make Deallocate() pass alignment and make it use (de)allocate_buffer
This lets it use sized deallocation and make more efficient alignment decisions. Also adjust BumpPtrAllocator to always allocate at alignof(std::max_align_t).
Diffstat (limited to 'llvm/unittests/ADT/StringMapTest.cpp')
-rw-r--r--llvm/unittests/ADT/StringMapTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp
index 2cad2c1..73c91f5 100644
--- a/llvm/unittests/ADT/StringMapTest.cpp
+++ b/llvm/unittests/ADT/StringMapTest.cpp
@@ -230,7 +230,7 @@ TEST_F(StringMapTest, StringMapEntryTest) {
StringRef(testKeyFirst, testKeyLength), Allocator, 1u);
EXPECT_STREQ(testKey, entry->first().data());
EXPECT_EQ(1u, entry->second);
- free(entry);
+ entry->Destroy(Allocator);
}
// Test insert() method.