summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/SetVector.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h
index e8d63edf9e..0ff0f46f88 100644
--- a/include/llvm/ADT/SetVector.h
+++ b/include/llvm/ADT/SetVector.h
@@ -141,8 +141,9 @@ public:
/// \returns true if any element is removed.
template <typename UnaryPredicate>
bool remove_if(UnaryPredicate P) {
- typename vector_type::iterator B = std::remove_if(vector_.begin(),
- vector_.end(), P),
+ typename vector_type::iterator B = std::partition(vector_.begin(),
+ vector_.end(),
+ std::not1(P)),
E = vector_.end();
if (B == E)
return false;