[llvm] [MapVector] Introduce {keys, values} iterator, use in VPlan (PR #169675)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 28 07:51:23 PST 2025


================
@@ -99,6 +99,11 @@ class MapVector {
     return try_emplace_impl(Key).first->second;
   }
 
+  [[nodiscard]] inline auto keys() { return make_first_range(Vector); }
+  [[nodiscard]] inline auto values() { return make_second_range(Vector); }
+  [[nodiscard]] inline auto keys() const { return make_first_range(Vector); }
----------------
fhahn wrote:

`keys()` appears unused (other than tests)? Are there other places that could use it? If not, better only introduce once there are users?

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


More information about the llvm-commits mailing list