[llvm] [MapVector] Introduce {keys,values} iterators (PR #169675)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 09:46:53 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); }
----------------
artagnon wrote:

Change to ADT only now; will investigate usage in follow-up, thanks.

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


More information about the llvm-commits mailing list