Author: zturner Date: Wed Sep 21 11:01:43 2016 New Revision: 282080 URL: http://llvm.org/viewvc/llvm-project?rev=282080&view=rev Log: Fix an inefficient StringRef conversion.
Since the original object was already an llvm::SmallString<> there's no point calling c_str() first. Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=282080&r1=282079&r2=282080&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Wed Sep 21 11:01:43 2016 @@ -1109,7 +1109,6 @@ Error GDBRemoteCommunication::StartDebug // Create a temporary file to get the stdout/stderr and redirect the // output of the command into this file. We will later read this file // if all goes well and fill the data into "command_output_ptr" - #if defined(__APPLE__) // Binding to port zero, we need to figure out what port it ends up // using using a named pipe... @@ -1123,8 +1122,7 @@ Error GDBRemoteCommunication::StartDebug return error; } debugserver_args.AppendArgument(llvm::StringRef("--named-pipe")); - debugserver_args.AppendArgument( - llvm::StringRef(named_pipe_path.c_str())); + debugserver_args.AppendArgument(named_pipe_path); #else // Binding to port zero, we need to figure out what port it ends up // using using an unnamed pipe... _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits