[Lldb-commits] [lldb] r268757 - debugserver: fix some -Wpessimizing-move warnings

Saleem Abdulrasool via lldb-commits lldb-commits at lists.llvm.org
Fri May 6 10:33:05 PDT 2016


Author: compnerd
Date: Fri May  6 12:33:04 2016
New Revision: 268757

URL: http://llvm.org/viewvc/llvm-project?rev=268757&view=rev
Log:
debugserver: fix some -Wpessimizing-move warnings

Remove the unnecessary use of std::move to permit the compiler to perform NVRO
instead.  Fixes more warnings from clang.  NFC.

Modified:
    lldb/trunk/tools/debugserver/source/RNBRemote.cpp

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=268757&r1=268756&r2=268757&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri May  6 12:33:04 2016
@@ -2570,13 +2570,13 @@ RNBRemote::DispatchQueueOffsets::GetThre
                 nub_addr_t pointer_to_label_address = dispatch_queue_t + dqo_label;
                 nub_addr_t label_addr = DNBProcessMemoryReadPointer (pid, pointer_to_label_address);
                 if (label_addr)
-                    queue_name = std::move(DNBProcessMemoryReadCString (pid, label_addr));
+                    queue_name = DNBProcessMemoryReadCString(pid, label_addr);
             }
             else
             {
                 // libdispatch versions 1-3, dispatch name is a fixed width char array
                 // in the queue structure.
-                queue_name = std::move(DNBProcessMemoryReadCStringFixed(pid, dispatch_queue_t + dqo_label, dqo_label_size));
+                queue_name = DNBProcessMemoryReadCStringFixed(pid, dispatch_queue_t + dqo_label, dqo_label_size);
             }
         }
     }
@@ -5687,7 +5687,7 @@ RNBRemote::HandlePacket_qSymbol (const c
     if (*p)
     {
         // We have a symbol name
-        symbol_name = std::move(decode_hex_ascii_string(p));
+        symbol_name = decode_hex_ascii_string(p);
         if (!symbol_value_str.empty())
         {
             nub_addr_t symbol_value = decode_uint64(symbol_value_str.c_str(), 16);




More information about the lldb-commits mailing list