llvm.org GIT mirror llvm / df046f0
Make SetVector's remove indicate whether it actually removed something. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114612 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
113113 }
114114
115115 /// @brief Remove an item from the set vector.
116 void remove(const value_type& X) {
116 bool remove(const value_type& X) {
117117 if (set_.erase(X)) {
118118 typename vector_type::iterator I =
119119 std::find(vector_.begin(), vector_.end(), X);
120120 assert(I != vector_.end() && "Corrupted SetVector instances!");
121121 vector_.erase(I);
122 return true;
122123 }
124 return false;
123125 }
124126
125127