[lldb] More windows StringRef fixes
authorPavel Labath <pavel@labath.sk>
Wed, 29 Jan 2020 10:15:20 +0000 (11:15 +0100)
committerPavel Labath <pavel@labath.sk>
Wed, 29 Jan 2020 10:15:20 +0000 (11:15 +0100)
I don't have a windows build around, so I am just going by the buildbot
messages.

lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
lldb/source/Host/windows/PipeWindows.cpp

index 9f38422..817663d 100644 (file)
@@ -127,7 +127,7 @@ lldb::ConnectionStatus ConnectionGenericFile::Connect(llvm::StringRef path,
   }
 
   m_owns_file = true;
-  m_uri.assign(path);
+  m_uri = path.str();
   return eConnectionStatusSuccess;
 }
 
index 873eb51..b63e58e 100644 (file)
@@ -104,7 +104,7 @@ Status PipeWindows::CreateNew(llvm::StringRef name,
   if (CanRead() || CanWrite())
     return Status(ERROR_ALREADY_EXISTS, eErrorTypeWin32);
 
-  std::string pipe_path = g_pipe_name_prefix;
+  std::string pipe_path = g_pipe_name_prefix.str();
   pipe_path.append(name.str());
 
   // Always open for overlapped i/o.  We implement blocking manually in Read
@@ -182,7 +182,7 @@ Status PipeWindows::OpenNamedPipe(llvm::StringRef name,
   SECURITY_ATTRIBUTES attributes = {};
   attributes.bInheritHandle = child_process_inherit;
 
-  std::string pipe_path = g_pipe_name_prefix;
+  std::string pipe_path = g_pipe_name_prefix.str();
   pipe_path.append(name.str());
 
   if (is_read) {