[Lldb-commits] [lldb] r252409 - Fix pessimizing moves. Found by clang.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Sat Nov 7 10:15:05 PST 2015


Author: davide
Date: Sat Nov  7 12:15:05 2015
New Revision: 252409

URL: http://llvm.org/viewvc/llvm-project?rev=252409&view=rev
Log:
Fix pessimizing moves. Found by clang.

Modified:
    lldb/trunk/source/Host/common/Editline.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=252409&r1=252408&r2=252409&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Sat Nov  7 12:15:05 2015
@@ -203,7 +203,7 @@ namespace lldb_private
                     {
                         snprintf (history_path, sizeof (history_path), "~/%s-widehistory", m_prefix.c_str());
                     }
-                    m_path = std::move (FileSpec (history_path, true).GetPath());
+                    m_path = FileSpec (history_path, true).GetPath();
                 }
                 if (m_path.empty())
                     return NULL;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=252409&r1=252408&r2=252409&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Sat Nov  7 12:15:05 2015
@@ -1621,7 +1621,7 @@ PlatformDarwin::GetOSVersion (uint32_t &
                     }
                     else if (env_str.startswith(k_dyld_root_path))
                     {
-                        dyld_root_path = std::move(env_str.substr(k_dyld_root_path.size()).str());
+                        dyld_root_path = env_str.substr(k_dyld_root_path.size()).str();
                     }
                 }
             }




More information about the lldb-commits mailing list