llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

Note that erase_if combines erase and remove_if.


---
Full diff: https://github.com/llvm/llvm-project/pull/146624.diff


1 Files Affected:

- (modified) lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp 
(+2-5) 


``````````diff
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);

``````````

</details>


https://github.com/llvm/llvm-project/pull/146624
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to