[llvm-branch-commits] [llvm] a553ac9 - [CodeGen] llvm::erase_if (NFC)
Kazu Hirata via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Dec 5 15:49:43 PST 2020
Author: Kazu Hirata
Date: 2020-12-05T15:44:40-08:00
New Revision: a553ac979146df59f0688882018dbb66f345c8f8
URL: https://github.com/llvm/llvm-project/commit/a553ac979146df59f0688882018dbb66f345c8f8
DIFF: https://github.com/llvm/llvm-project/commit/a553ac979146df59f0688882018dbb66f345c8f8.diff
LOG: [CodeGen] llvm::erase_if (NFC)
Added:
Modified:
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index 461a73741648..61e803fbfc40 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -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;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 9d2174f4b85a..397a69654933 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -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);
}
}
More information about the llvm-branch-commits
mailing list