if (Int->isSuccessor(NodeHeader)) {
// If we were in the successor list from before... remove from succ list
- Int->Successors.erase(std::remove(Int->Successors.begin(),
- Int->Successors.end(), NodeHeader),
- Int->Successors.end());
+ llvm::erase_value(Int->Successors, NodeHeader);
}
// Now that we have discovered that Node is in the interval, perhaps some
AffectedValues.erase(AVI);
}
- AssumeHandles.erase(
- remove_if(AssumeHandles, [CI](ResultElem &RE) { return CI == RE; }),
- AssumeHandles.end());
+ erase_value(AssumeHandles, CI);
}
void AssumptionCache::AffectedValueCallbackVH::deleted() {
// there. However, we have to be careful to not remove the back of the queue
// as that is assumed to match the current loop.
assert(LQ.back() == CurrentLoop && "Loop queue back isn't the current loop!");
- LQ.erase(std::remove(LQ.begin(), LQ.end(), &L), LQ.end());
+ llvm::erase_value(LQ, &L);
if (&L == CurrentLoop) {
CurrentLoopDeleted = true;