From 41610d665013d716da245175ada1d9c5a8b79558 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Mon, 6 Apr 2020 14:59:01 -0700 Subject: [PATCH] [gdb-remote] Moving prevents copy elision. Found by clang. --- .../Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;