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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 4 06:09:31 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 {
----------------
fhahn wrote:

Ah right I guess if it is just a single use it could just do `members(findLeader(V))`?

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


More information about the llvm-commits mailing list