[Lldb-commits] [lldb] 41610d6 - [gdb-remote] Moving prevents copy elision. Found by clang.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 6 14:59:35 PDT 2020


Author: Davide Italiano
Date: 2020-04-06T14:59:27-07:00
New Revision: 41610d665013d716da245175ada1d9c5a8b79558

URL: https://github.com/llvm/llvm-project/commit/41610d665013d716da245175ada1d9c5a8b79558
DIFF: https://github.com/llvm/llvm-project/commit/41610d665013d716da245175ada1d9c5a8b79558.diff

LOG: [gdb-remote] Moving prevents copy elision. Found by clang.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 3e7ab27802a8..f8b09d5207ab 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -643,7 +643,7 @@ static json::Array GetStackMemoryAsJSON(NativeProcessProtocol &process,
   if (error.Success() && bytes_read > 0) {
     buf.resize(bytes_read);
     stack_memory_chunks.push_back(
-        std::move(CreateMemoryChunk(stack_memory_chunks, sp_value, buf)));
+        CreateMemoryChunk(stack_memory_chunks, sp_value, buf));
   }
 
   // Additionally, try to walk the frame pointer link chain. If the frame
@@ -662,7 +662,7 @@ static json::Array GetStackMemoryAsJSON(NativeProcessProtocol &process,
       break;
 
     stack_memory_chunks.push_back(
-        std::move(CreateMemoryChunk(stack_memory_chunks, fp_value, fp_ra_buf)));
+        CreateMemoryChunk(stack_memory_chunks, fp_value, fp_ra_buf));
 
     // Advance the stack pointer and the frame pointer.
     sp_value = fp_value;


        


More information about the lldb-commits mailing list