Skip to content

Commit 7ead20d

Browse files
[lldb] Use llvm::erase_if (NFC) (#146624)
Note that erase_if combines erase and remove_if.
1 parent 82c0a53 commit 7ead20d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,11 +1891,8 @@ RISCVSingleStepBreakpointLocationsPredictor::HandleAtomicSequence(
18911891

18921892
// Set breakpoints at the jump addresses of the forward branches that points
18931893
// after the end of the atomic sequence.
1894-
bp_addrs.erase(llvm::remove_if(bp_addrs,
1895-
[exit_pc](lldb::addr_t bp_addr) {
1896-
return exit_pc >= bp_addr;
1897-
}),
1898-
bp_addrs.end());
1894+
llvm::erase_if(
1895+
bp_addrs, [exit_pc](lldb::addr_t bp_addr) { return exit_pc >= bp_addr; });
18991896

19001897
// Set breakpoint at the end of atomic sequence.
19011898
bp_addrs.push_back(exit_pc);

0 commit comments

Comments
 (0)