diff options
author | David Blaikie <dblaikie@gmail.com> | 2023-12-14 17:42:12 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2023-12-14 17:44:18 +0000 |
commit | f976719fb2cb23364957e5993f7fc3684ee15391 (patch) | |
tree | 5dacab14d9355be2a6efaffc10cdb47132ce586a /llvm/unittests/ADT/StringMapTest.cpp | |
parent | 5bc1adff69315dcef670e9fcbe04067b5d5963fb (diff) | |
download | llvm-f976719fb2cb23364957e5993f7fc3684ee15391.zip llvm-f976719fb2cb23364957e5993f7fc3684ee15391.tar.gz llvm-f976719fb2cb23364957e5993f7fc3684ee15391.tar.bz2 |
Revert "[ADT][StringMap] Add ability to precompute and reuse the string hash"
Crash identified internally in lld's use of StringMap in
`compareSections`. Will investigate offline before recommitting.
This reverts commit 67c631d283fc96d652304199cd625be426b98f8e.
Diffstat (limited to 'llvm/unittests/ADT/StringMapTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/StringMapTest.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp index c9ef3f8a..f9b138e 100644 --- a/llvm/unittests/ADT/StringMapTest.cpp +++ b/llvm/unittests/ADT/StringMapTest.cpp @@ -487,17 +487,6 @@ TEST_F(StringMapTest, NotEqualWithDifferentValues) { ASSERT_TRUE(B != A); } -TEST_F(StringMapTest, PrecomputedHash) { - StringMap<int> A; - StringRef Key = "foo"; - int Value = 42; - uint64_t Hash = StringMap<int>::hash(Key); - A.insert({"foo", Value}, Hash); - auto I = A.find(Key, Hash); - ASSERT_NE(I, A.end()); - ASSERT_EQ(I->second, Value); -} - struct Countable { int &InstanceCount; int Number; |