Skip to content

Commit 58a13ba

Browse files
author
git apple-llvm automerger
committed
Merge commit 'ddc5a5920e5d' from llvm.org/master into apple/main
2 parents de2de8a + ddc5a59 commit 58a13ba

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

llvm/include/llvm/Analysis/IntervalIterator.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ class IntervalIterator {
227227

228228
if (Int->isSuccessor(NodeHeader)) {
229229
// If we were in the successor list from before... remove from succ list
230-
Int->Successors.erase(std::remove(Int->Successors.begin(),
231-
Int->Successors.end(), NodeHeader),
232-
Int->Successors.end());
230+
llvm::erase_value(Int->Successors, NodeHeader);
233231
}
234232

235233
// Now that we have discovered that Node is in the interval, perhaps some

llvm/lib/Analysis/AssumptionCache.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ void AssumptionCache::unregisterAssumption(CallInst *CI) {
163163
AffectedValues.erase(AVI);
164164
}
165165

166-
AssumeHandles.erase(
167-
remove_if(AssumeHandles, [CI](ResultElem &RE) { return CI == RE; }),
168-
AssumeHandles.end());
166+
erase_value(AssumeHandles, CI);
169167
}
170168

171169
void AssumptionCache::AffectedValueCallbackVH::deleted() {

llvm/lib/Analysis/LoopPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void LPPassManager::markLoopAsDeleted(Loop &L) {
117117
// there. However, we have to be careful to not remove the back of the queue
118118
// as that is assumed to match the current loop.
119119
assert(LQ.back() == CurrentLoop && "Loop queue back isn't the current loop!");
120-
LQ.erase(std::remove(LQ.begin(), LQ.end(), &L), LQ.end());
120+
llvm::erase_value(LQ, &L);
121121

122122
if (&L == CurrentLoop) {
123123
CurrentLoopDeleted = true;

0 commit comments

Comments
 (0)