[Lldb-commits] [lldb] 7ead20d - [lldb] Use llvm::erase_if (NFC) (#146624)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 2 03:01:02 PDT 2025
Author: Kazu Hirata
Date: 2025-07-02T11:00:58+01:00
New Revision: 7ead20db28425b81ae56f27928af909f518d7c60
URL: https://github.com/llvm/llvm-project/commit/7ead20db28425b81ae56f27928af909f518d7c60
DIFF: https://github.com/llvm/llvm-project/commit/7ead20db28425b81ae56f27928af909f518d7c60.diff
LOG: [lldb] Use llvm::erase_if (NFC) (#146624)
Note that erase_if combines erase and remove_if.
Added:
Modified:
lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index c22d5bbdb6924..2adde02aca3a1 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -1891,11 +1891,8 @@ RISCVSingleStepBreakpointLocationsPredictor::HandleAtomicSequence(
// Set breakpoints at the jump addresses of the forward branches that points
// after the end of the atomic sequence.
- bp_addrs.erase(llvm::remove_if(bp_addrs,
- [exit_pc](lldb::addr_t bp_addr) {
- return exit_pc >= bp_addr;
- }),
- bp_addrs.end());
+ llvm::erase_if(
+ bp_addrs, [exit_pc](lldb::addr_t bp_addr) { return exit_pc >= bp_addr; });
// Set breakpoint at the end of atomic sequence.
bp_addrs.push_back(exit_pc);
More information about the lldb-commits
mailing list