Skip to content

Commit a553ac9

Browse files
[CodeGen] llvm::erase_if (NFC)
1 parent c4e327a commit a553ac9

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

llvm/lib/CodeGen/MachineBlockPlacement.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,11 +1673,9 @@ MachineBasicBlock *MachineBlockPlacement::selectBestCandidateBlock(
16731673
// worklist of already placed entries.
16741674
// FIXME: If this shows up on profiles, it could be folded (at the cost of
16751675
// some code complexity) into the loop below.
1676-
WorkList.erase(llvm::remove_if(WorkList,
1677-
[&](MachineBasicBlock *BB) {
1678-
return BlockToChain.lookup(BB) == &Chain;
1679-
}),
1680-
WorkList.end());
1676+
llvm::erase_if(WorkList, [&](MachineBasicBlock *BB) {
1677+
return BlockToChain.lookup(BB) == &Chain;
1678+
});
16811679

16821680
if (WorkList.empty())
16831681
return nullptr;

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ void SelectionDAGBuilder::dropDanglingDebugInfo(const DILocalVariable *Variable,
11411141
if (isMatchingDbgValue(DDI))
11421142
salvageUnresolvedDbgValue(DDI);
11431143

1144-
DDIV.erase(remove_if(DDIV, isMatchingDbgValue), DDIV.end());
1144+
erase_if(DDIV, isMatchingDbgValue);
11451145
}
11461146
}
11471147

0 commit comments

Comments
 (0)