[llvm] [ADT] Refactor DenseMap::insert, try_emplace, and operator[] (NFC) (PR #155204)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 07:19:01 PDT 2025


================
@@ -496,6 +475,18 @@ class DenseMapBase : public DebugEpochBase {
   static const KeyT getTombstoneKey() { return KeyInfoT::getTombstoneKey(); }
 
 private:
+  template <typename KeyArgT, typename... Ts>
+  std::pair<iterator, bool> try_emplace_impl(KeyArgT &&Key, Ts &&...Args) {
+    BucketT *TheBucket;
----------------
kazutakahirata wrote:

Updated.  Thanks!

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


More information about the llvm-commits mailing list