[llvm] [ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct} (PR #108678)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 20:38:12 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
These functions have been deprecated since:
commit 59a3b4156836c3ea8589d7a39e7b4712fc8698ec
Author: Kazu Hirata <kazu@<!-- -->google.com>
Date: Tue Sep 3 08:19:45 2024 -0700
commit 7732d8e51819416b9d28b1815bdf81d0e0642b04
Author: Kazu Hirata <kazu@<!-- -->google.com>
Date: Wed Sep 4 06:51:30 2024 -0700
---
Full diff: https://github.com/llvm/llvm-project/pull/108678.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/DenseMap.h (-34)
``````````diff
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))
``````````
</details>
https://github.com/llvm/llvm-project/pull/108678
More information about the llvm-commits
mailing list