[llvm] [ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct} (PR #108678)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 20:37:43 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/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
>From e6597368c8888794a2446847beb8c91b15047f62 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 3 Sep 2024 21:34:55 -0700
Subject: [PATCH] [ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct}
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
---
llvm/include/llvm/ADT/DenseMap.h | 34 --------------------------------
1 file changed, 34 deletions(-)
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