[llvm] EquivalenceClasses: Make ECValue public. NFC (PR #139689)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 01:49:37 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: Ruiling, Song (ruiling)

<details>
<summary>Changes</summary>

Expose the inner class so that we can explicitly write the type outside the parent class.

---
Full diff: https://github.com/llvm/llvm-project/pull/139689.diff


1 Files Affected:

- (modified) llvm/include/llvm/ADT/EquivalenceClasses.h (+2) 


``````````diff
diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h
index fed012ce56005..b1009f8b49992 100644
--- a/llvm/include/llvm/ADT/EquivalenceClasses.h
+++ b/llvm/include/llvm/ADT/EquivalenceClasses.h
@@ -60,6 +60,7 @@ namespace llvm {
 ///   5 1 2
 ///
 template <class ElemTy> class EquivalenceClasses {
+public:
   /// ECValue - The EquivalenceClasses data structure is just a set of these.
   /// Each of these represents a relation for a value.  First it stores the
   /// value itself. Next, it provides a "next pointer", which is used to
@@ -122,6 +123,7 @@ template <class ElemTy> class EquivalenceClasses {
     }
   };
 
+private:
   /// TheMapping - This implicitly provides a mapping from ElemTy values to the
   /// ECValues, it just keeps the key as part of the value.
   DenseMap<ElemTy, ECValue *> TheMapping;

``````````

</details>


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


More information about the llvm-commits mailing list