Switch the SetVector::remove_if implementation to use partition which
authorChandler Carruth <chandlerc@gmail.com>
Wed, 3 Oct 2012 00:03:00 +0000 (00:03 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 3 Oct 2012 00:03:00 +0000 (00:03 +0000)
commit3f57b82979a633eb8f38f4de69d58faf9691e8b5
treedc61a7f19cfe815005a82d91bb85816c8b29b585
parent214156c43dc1522c22faa730e5c51e192992478b
Switch the SetVector::remove_if implementation to use partition which
preserves the values of the relocated entries, unlikely remove_if. This
allows walking them and erasing them.

Also flesh out the predicate we are using for this to support the
various constraints actually imposed on a UnaryPredicate -- without this
we can't compose it with std::not1.

Thanks to Sean Silva for the review here and noticing the issue with
std::remove_if.

llvm-svn: 165073
llvm/include/llvm/ADT/SetVector.h
llvm/lib/Transforms/Scalar/SROA.cpp