aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/SmallSet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h
index dd1081e388..f0481fcef3 100644
--- a/include/llvm/ADT/SmallSet.h
+++ b/include/llvm/ADT/SmallSet.h
@@ -57,7 +57,7 @@ public:
/// insert - Insert an element into the set if it isn't already there.
std::pair<iterator,bool> insert(const T &V) {
iterator I = find(V);
- if (I == end()) // Don't reinsert if it already exists.
+ if (I != end()) // Don't reinsert if it already exists.
return std::make_pair(I, false);
Vector.push_back(V);
return std::make_pair(end()-1, true);