Skip to content

Commit

Permalink
[CodeGen] llvm::erase_if (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Dec 5, 2020
1 parent c4e327a commit a553ac9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions llvm/lib/CodeGen/MachineBlockPlacement.cpp
Expand Up @@ -1673,11 +1673,9 @@ MachineBasicBlock *MachineBlockPlacement::selectBestCandidateBlock(
// worklist of already placed entries.
// FIXME: If this shows up on profiles, it could be folded (at the cost of
// some code complexity) into the loop below.
WorkList.erase(llvm::remove_if(WorkList,
[&](MachineBasicBlock *BB) {
return BlockToChain.lookup(BB) == &Chain;
}),
WorkList.end());
llvm::erase_if(WorkList, [&](MachineBasicBlock *BB) {
return BlockToChain.lookup(BB) == &Chain;
});

if (WorkList.empty())
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Expand Up @@ -1141,7 +1141,7 @@ void SelectionDAGBuilder::dropDanglingDebugInfo(const DILocalVariable *Variable,
if (isMatchingDbgValue(DDI))
salvageUnresolvedDbgValue(DDI);

DDIV.erase(remove_if(DDIV, isMatchingDbgValue), DDIV.end());
erase_if(DDIV, isMatchingDbgValue);
}
}

Expand Down

0 comments on commit a553ac9

Please sign in to comment.