diff --git a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp index 9f38422d7e3d..817663d6212e 100644 --- a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp +++ b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp @@ -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; } diff --git a/lldb/source/Host/windows/PipeWindows.cpp b/lldb/source/Host/windows/PipeWindows.cpp index 873eb51dc682..b63e58e53e7f 100644 --- a/lldb/source/Host/windows/PipeWindows.cpp +++ b/lldb/source/Host/windows/PipeWindows.cpp @@ -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) {