[clang] [llvm] [mlir] [ADT] Give DenseMapPair its own members instead of a std::pair base. NFC (PR #221853)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 19:53:29 PDT 2026


================
@@ -242,7 +242,7 @@ void BitcodeReaderMetadataList::tryToResolveCycles() {
 
   // Give up on finding a full definition for any forward decls that remain.
   for (const auto &Ref : OldTypeRefs.FwdDecls)
-    OldTypeRefs.Final.insert(Ref);
+    OldTypeRefs.Final.try_emplace(Ref.first, Ref.second);
----------------
kazutakahirata wrote:

If you have to break up `Ref`, may I suggest structured bindings?
```
for (const auto &[UUID, CT] : OldTypeRefs.FwdDecls)
  OldTypeRefs.Final.try_emplace(UUID, CT);
```


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


More information about the cfe-commits mailing list