From: Bill Wendling Date: Mon, 12 Jul 2010 20:27:02 +0000 (+0000) Subject: getOrInsertLeaderValue cannot be const because it calls insert. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=18f82a9a5d81c1214714be1b25f3e548030b7e1c;p=oota-llvm.git getOrInsertLeaderValue cannot be const because it calls insert. Patch by Xi Wang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108188 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/EquivalenceClasses.h b/include/llvm/ADT/EquivalenceClasses.h index 91a14294516..07a5edfdb6c 100644 --- a/include/llvm/ADT/EquivalenceClasses.h +++ b/include/llvm/ADT/EquivalenceClasses.h @@ -169,7 +169,7 @@ public: /// 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;