[Lldb-commits] [lldb] [NFC][lldb-dap] Avoid unnecessary copy in setBreakpoint (PR #142179)
via lldb-commits
lldb-commits at lists.llvm.org
Fri May 30 09:08:59 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ebuka Ezike (da-viper)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/142179.diff
1 Files Affected:
- (modified) lldb/tools/lldb-dap/Handler/SetBreakpointsRequestHandler.cpp (+1-3)
``````````diff
diff --git a/lldb/tools/lldb-dap/Handler/SetBreakpointsRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/SetBreakpointsRequestHandler.cpp
index 0ff88f62f8f51..5d336af740c99 100644
--- a/lldb/tools/lldb-dap/Handler/SetBreakpointsRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/SetBreakpointsRequestHandler.cpp
@@ -7,8 +7,6 @@
//===----------------------------------------------------------------------===//
#include "DAP.h"
-#include "EventHelper.h"
-#include "JSONUtils.h"
#include "Protocol/ProtocolRequests.h"
#include "RequestHandler.h"
#include <vector>
@@ -22,7 +20,7 @@ namespace lldb_dap {
llvm::Expected<protocol::SetBreakpointsResponseBody>
SetBreakpointsRequestHandler::Run(
const protocol::SetBreakpointsArguments &args) const {
- const auto response_breakpoints =
+ std::vector<protocol::Breakpoint> response_breakpoints =
dap.SetSourceBreakpoints(args.source, args.breakpoints);
return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)};
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/142179
More information about the lldb-commits
mailing list