From 9a4e30117f8c73eacc016cdb64af3bdf0fd19981 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 21 Sep 2016 16:01:43 +0000 Subject: [PATCH] Fix an inefficient StringRef conversion. Since the original object was already an llvm::SmallString<> there's no point calling c_str() first. llvm-svn: 282080 --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index de7d524..7cb0275 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -1109,7 +1109,6 @@ Error GDBRemoteCommunication::StartDebugserverProcess( // 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::StartDebugserverProcess( 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... -- 2.7.4