From f913fd6eb0c228041b77a645d76993760d3b1421 Mon Sep 17 00:00:00 2001 From: Lawrence D'Anna Date: Thu, 3 Oct 2019 04:31:46 +0000 Subject: factor out an abstract base class for File Summary: This patch factors out File as an abstract base class and moves most of its actual functionality into a subclass called NativeFile. In the next patch, I'm going to be adding subclasses of File that don't necessarily have any connection to actual OS files, so they will not inherit from NativeFile. This patch was split out as a prerequisite for https://reviews.llvm.org/D68188 Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68317 llvm-svn: 373564 --- lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp') diff --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp index f9759ec3caf..325d854921e 100644 --- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -86,8 +86,8 @@ ConnectionFileDescriptor::ConnectionFileDescriptor(bool child_processes_inherit) ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd) : Connection(), m_pipe(), m_mutex(), m_shutting_down(false), m_waiting_for_accept(false), m_child_processes_inherit(false) { - m_write_sp = std::make_shared(fd, File::eOpenOptionWrite, owns_fd); - m_read_sp = std::make_shared(fd, File::eOpenOptionRead, false); + m_write_sp = std::make_shared(fd, File::eOpenOptionWrite, owns_fd); + m_read_sp = std::make_shared(fd, File::eOpenOptionRead, false); Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION | LIBLLDB_LOG_OBJECT)); @@ -219,9 +219,9 @@ ConnectionStatus ConnectionFileDescriptor::Connect(llvm::StringRef path, m_write_sp = m_read_sp; } else { m_read_sp = - std::make_shared(fd, File::eOpenOptionRead, false); + std::make_shared(fd, File::eOpenOptionRead, false); m_write_sp = - std::make_shared(fd, File::eOpenOptionWrite, false); + std::make_shared(fd, File::eOpenOptionWrite, false); } m_uri = *addr; return eConnectionStatusSuccess; @@ -270,8 +270,8 @@ ConnectionStatus ConnectionFileDescriptor::Connect(llvm::StringRef path, ::fcntl(fd, F_SETFL, flags); } } - m_read_sp = std::make_shared(fd, File::eOpenOptionRead, true); - m_write_sp = std::make_shared(fd, File::eOpenOptionWrite, false); + m_read_sp = std::make_shared(fd, File::eOpenOptionRead, true); + m_write_sp = std::make_shared(fd, File::eOpenOptionWrite, false); return eConnectionStatusSuccess; } #endif -- cgit v1.2.3