[llvm] [EquivClasses] Shorten members_{begin,end} idiom (PR #134373)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 4 06:12:07 PDT 2025


================
@@ -184,6 +185,14 @@ class EquivalenceClasses {
     return member_iterator(nullptr);
   }
 
+  iterator_range<member_iterator> members(const ECValue &ECV) const {
+    return make_range(member_begin(ECV), member_end());
+  }
+
+  iterator_range<member_iterator> members(const ElemTy &V) const {
----------------
artagnon wrote:

Yeah, I had that initially, but I think the new API is clean, and makes a lot of intuitive sense.

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


More information about the llvm-commits mailing list