[llvm] [ADT] Add a helper function to create iterators in DenseMap (NFC) (PR #155133)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 24 08:18:44 PDT 2025


================
@@ -257,22 +257,13 @@ class DenseMapBase : public DebugEpochBase {
   std::pair<iterator, bool> try_emplace(KeyT &&Key, Ts &&...Args) {
     BucketT *TheBucket;
     if (LookupBucketFor(Key, TheBucket))
-      return std::make_pair(makeIterator(TheBucket,
-                                         shouldReverseIterate<KeyT>()
-                                             ? getBuckets()
-                                             : getBucketsEnd(),
-                                         *this, true),
+      return std::make_pair(makeInsertIterator(TheBucket),
----------------
kazutakahirata wrote:

Ack.  Thank you for the review as always!  I'll create a follow-up PR.

https://github.com/llvm/llvm-project/pull/155133


More information about the llvm-commits mailing list