projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66e7cd0
)
Fix the replace method to assert if an item was erased from the set but not
author
Reid Spencer
<rspencer@reidspencer.com>
Sat, 11 Sep 2004 20:38:25 +0000
(20:38 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Sat, 11 Sep 2004 20:38:25 +0000
(20:38 +0000)
found in the vector. Previously, it just ignored this condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16296
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SetVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SetVector.h
b/include/llvm/ADT/SetVector.h
index 8d7382e05632d18da231c7fb0620d6ee0cd38120..cd5c2df7f11d627906406a8d4dce85f844a8b084 100644
(file)
--- a/
include/llvm/ADT/SetVector.h
+++ b/
include/llvm/ADT/SetVector.h
@@
-113,8
+113,8
@@
public:
void remove(const value_type& X) {
if (0 < set_.erase(X)) {
iterator I = find(vector_.begin(),vector_.end(),X);
- if (I != vector_.end())
-
vector_.erase(I);
+ assert(I != vector_.end() && "Corrupted SetVector instances!");
+ vector_.erase(I);
}
}