[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:30 PDT 2026


================
@@ -2205,8 +2205,7 @@ bool SampleProfileLoader::runOnModule(Module &M, ModuleAnalysisManager &AM,
 
   // Account for cold calls not inlined....
   if (!FunctionSamples::ProfileIsCS)
-    for (const std::pair<Function *, NotInlinedProfileInfo> &pair :
-         notInlinedCallInfo)
+    for (const auto &pair : notInlinedCallInfo)
----------------
kazutakahirata wrote:

Could we use structured bindings here as well?

```cpp
for (const auto &[I, Info] : UPB->second.Insts)
  Insts.emplace_back(I, Info);
```


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


More information about the cfe-commits mailing list