[LLVMdev] [patch] EquivalenceClasses.h

Xi Wang xi.wang at gmail.com
Mon Jul 12 08:43:07 PDT 2010


getOrInsertLeaderValue cannot be const because it calls insert.

Index: include/llvm/ADT/EquivalenceClasses.h
===================================================================
--- include/llvm/ADT/EquivalenceClasses.h	(revision 108148)
+++ include/llvm/ADT/EquivalenceClasses.h	(working copy)
@@ -169,7 +169,7 @@
   /// getOrInsertLeaderValue - Return the leader for the specified
value that is
   /// in the set.  If the member is not in the set, it is inserted, then
   /// returned.
-  const ElemTy &getOrInsertLeaderValue(const ElemTy &V) const {
+  const ElemTy &getOrInsertLeaderValue(const ElemTy &V) {
     member_iterator MI = findLeader(insert(V));
     assert(MI != member_end() && "Value is not in the set!");
     return *MI;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec.patch
Type: application/octet-stream
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100712/4622b144/attachment.obj>


More information about the llvm-dev mailing list