[llvm] 390b82d - [ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct} (#108678)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 23:34:26 PDT 2024
Author: Kazu Hirata
Date: 2024-09-13T23:34:23-07:00
New Revision: 390b82dd4c485ec64cf8a6c52fb73e391792262e
URL: https://github.com/llvm/llvm-project/commit/390b82dd4c485ec64cf8a6c52fb73e391792262e
DIFF: https://github.com/llvm/llvm-project/commit/390b82dd4c485ec64cf8a6c52fb73e391792262e.diff
LOG: [ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct} (#108678)
These functions have been deprecated since:
commit 59a3b4156836c3ea8589d7a39e7b4712fc8698ec
Author: Kazu Hirata <kazu at google.com>
Date: Tue Sep 3 08:19:45 2024 -0700
commit 7732d8e51819416b9d28b1815bdf81d0e0642b04
Author: Kazu Hirata <kazu at google.com>
Date: Wed Sep 4 06:51:30 2024 -0700
Added:
Modified:
llvm/include/llvm/ADT/DenseMap.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
index 68498a3de993a1..f0f992f8eac389 100644
--- a/llvm/include/llvm/ADT/DenseMap.h
+++ b/llvm/include/llvm/ADT/DenseMap.h
@@ -318,22 +318,6 @@ class DenseMapBase : public DebugEpochBase {
return Ret;
}
- /// Returns the value associated to the key in the map if it exists. If it
- /// does not exist, emplace a default value for the key and returns a
- /// reference to the newly created value.
- LLVM_DEPRECATED("Use operator[] instead", "[Key]")
- ValueT &getOrInsertDefault(KeyT &&Key) {
- return try_emplace(Key).first->second;
- }
-
- /// Returns the value associated to the key in the map if it exists. If it
- /// does not exist, emplace a default value for the key and returns a
- /// reference to the newly created value.
- LLVM_DEPRECATED("Use operator[] instead", "[Key]")
- ValueT &getOrInsertDefault(const KeyT &Key) {
- return try_emplace(Key).first->second;
- }
-
bool erase(const KeyT &Val) {
BucketT *TheBucket = doFind(Val);
if (!TheBucket)
@@ -353,15 +337,6 @@ class DenseMapBase : public DebugEpochBase {
incrementNumTombstones();
}
- LLVM_DEPRECATED("Use [Key] instead", "[Key]")
- value_type &FindAndConstruct(const KeyT &Key) {
- BucketT *TheBucket;
- if (LookupBucketFor(Key, TheBucket))
- return *TheBucket;
-
- return *InsertIntoBucket(TheBucket, Key);
- }
-
ValueT &operator[](const KeyT &Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
@@ -370,15 +345,6 @@ class DenseMapBase : public DebugEpochBase {
return InsertIntoBucket(TheBucket, Key)->second;
}
- LLVM_DEPRECATED("Use [Key] instead", "[Key]")
- value_type &FindAndConstruct(KeyT &&Key) {
- BucketT *TheBucket;
- if (LookupBucketFor(Key, TheBucket))
- return *TheBucket;
-
- return *InsertIntoBucket(TheBucket, std::move(Key));
- }
-
ValueT &operator[](KeyT &&Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
More information about the llvm-commits
mailing list