1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[Analysis] Use llvm::erase_value (NFC)

This commit is contained in:
Kazu Hirata 2020-12-14 22:40:13 -08:00
parent f039b9862f
commit c82f0756af
3 changed files with 3 additions and 7 deletions

View File

@ -227,9 +227,7 @@ private:
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

View File

@ -163,9 +163,7 @@ void AssumptionCache::unregisterAssumption(CallInst *CI) {
AffectedValues.erase(AVI);
}
AssumeHandles.erase(
remove_if(AssumeHandles, [CI](ResultElem &RE) { return CI == RE; }),
AssumeHandles.end());
erase_value(AssumeHandles, CI);
}
void AssumptionCache::AffectedValueCallbackVH::deleted() {

View File

@ -117,7 +117,7 @@ void LPPassManager::markLoopAsDeleted(Loop &L) {
// 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;