Skip to content

[ADT] Remove DenseMap::{getOrInsertDefault,FindAndConstruct} #108678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

These functions have been deprecated since:

commit 59a3b41
Author: Kazu Hirata [email protected]
Date: Tue Sep 3 08:19:45 2024 -0700

commit 7732d8e
Author: Kazu Hirata [email protected]
Date: Wed Sep 4 06:51:30 2024 -0700

These functions have been deprecated since:

  commit 59a3b41
  Author: Kazu Hirata <[email protected]>
  Date:   Tue Sep 3 08:19:45 2024 -0700

  commit 7732d8e
  Author: Kazu Hirata <[email protected]>
  Date:   Wed Sep 4 06:51:30 2024 -0700
@llvmbot
Copy link
Member

llvmbot commented Sep 14, 2024

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

Changes

These functions have been deprecated since:

commit 59a3b41
Author: Kazu Hirata <[email protected]>
Date: Tue Sep 3 08:19:45 2024 -0700

commit 7732d8e
Author: Kazu Hirata <[email protected]>
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 --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))

@kazutakahirata kazutakahirata merged commit 390b82d into llvm:main Sep 14, 2024
10 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_DenseMap_remove_deprecated branch September 14, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants