Skip to content

Commit 0d524bc

Browse files
[llvm-mca] Use llvm::erase_if (NFC) (llvm#96029)
1 parent 60984f5 commit 0d524bc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/tools/llvm-mca/CodeRegion.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,9 @@ class CodeRegion {
104104
dropInstructions(const llvm::SmallPtrSetImpl<const llvm::MCInst *> &Insts) {
105105
if (Insts.empty())
106106
return Instructions;
107-
Instructions.erase(std::remove_if(Instructions.begin(), Instructions.end(),
108-
[&Insts](const llvm::MCInst &Inst) {
109-
return Insts.contains(&Inst);
110-
}),
111-
Instructions.end());
107+
llvm::erase_if(Instructions, [&Insts](const llvm::MCInst &Inst) {
108+
return Insts.contains(&Inst);
109+
});
112110
return Instructions;
113111
}
114112

0 commit comments

Comments
 (0)