[LLVMdev] [patch] EquivalenceClasses.h

Bill Wendling wendling at apple.com
Mon Jul 12 13:27:53 PDT 2010


Hrm...yes, it shouldn't have const. Applied. Thanks!

-bw

On Jul 12, 2010, at 8:43 AM, Xi Wang wrote:

> 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;
> <ec.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list