[llvm] [EquivalenceClasses] Introduce erase member function (PR #134660)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 08:46:57 PDT 2025


================
@@ -220,6 +218,41 @@ template <class ElemTy> class EquivalenceClasses {
     return *ECV;
   }
 
+  /// erase - Erase a value from the union/find set, return if erase succeed.
+  bool erase(const ElemTy &V) {
+    if (!TheMapping.contains(V))
+      return false;
+    const ECValue *cur = TheMapping[V];
+    const ECValue *next = cur->getNext();
----------------
fhahn wrote:

LLVM coding style uses upper case letters for variables.

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


More information about the llvm-commits mailing list