[Lldb-commits] [PATCH] D142824: [lldb][NFC] Use move instead of copy

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 1 07:52:03 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6953dc95a976: [lldb][NFC] Use move instead of copy (authored by ccotter, committed by Michael137).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142824/new/

https://reviews.llvm.org/D142824

Files:
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
  lldb/source/Target/Process.cpp


Index: lldb/source/Target/Process.cpp
===================================================================
--- lldb/source/Target/Process.cpp
+++ lldb/source/Target/Process.cpp
@@ -3352,7 +3352,7 @@
 
 void Process::SetUnixSignals(UnixSignalsSP &&signals_sp) {
   assert(signals_sp && "null signals_sp");
-  m_unix_signals_sp = signals_sp;
+  m_unix_signals_sp = std::move(signals_sp);
 }
 
 const lldb::UnixSignalsSP &Process::GetUnixSignals() {
Index: lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
===================================================================
--- lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
+++ lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
@@ -69,7 +69,7 @@
 
 void HTRBlockLayer::AppendNewBlock(size_t block_id, HTRBlock &&block) {
   m_block_id_trace.emplace_back(block_id);
-  m_block_defs.emplace(block_id, block);
+  m_block_defs.emplace(block_id, std::move(block));
 }
 
 void HTRBlockLayer::AppendRepeatedBlock(size_t block_id) {
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -559,7 +559,7 @@
 }
 
 void GDBRemoteCommunicationServerPlatform::SetPortMap(PortMap &&port_map) {
-  m_port_map = port_map;
+  m_port_map = std::move(port_map);
 }
 
 const FileSpec &GDBRemoteCommunicationServerPlatform::GetDomainSocketDir() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142824.493946.patch
Type: text/x-patch
Size: 1559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230201/d56735c6/attachment.bin>


More information about the lldb-commits mailing list