diff options
author | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
commit | 97206d572797bddc1bba71bb1c18c97f19d69053 (patch) | |
tree | fdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp | |
parent | 3086b45a2fae833e8419885e78c598d936cc6429 (diff) | |
download | bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed
on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without
find and replace, but that has potential to catch unwanted
occurrences of common strings such as "Error". Every effort
was made to find all the obvious things such as the word "Error"
appearing in a string, etc, but it's possible there are still
some lingering occurences left around. Hopefully nothing too
serious.
llvm-svn: 302872
Diffstat (limited to 'lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp')
-rw-r--r-- | lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp index befc847d8a8..7a0c92b4491 100644 --- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -123,7 +123,7 @@ void ConnectionFileDescriptor::OpenCommandPipe() { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); // Make the command file descriptor here: - Error result = m_pipe.CreateNew(m_child_processes_inherit); + Status result = m_pipe.CreateNew(m_child_processes_inherit); if (!result.Success()) { if (log) log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe () - could not " @@ -153,7 +153,7 @@ bool ConnectionFileDescriptor::IsConnected() const { } ConnectionStatus ConnectionFileDescriptor::Connect(llvm::StringRef path, - Error *error_ptr) { + Status *error_ptr) { std::lock_guard<std::recursive_mutex> guard(m_mutex); Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) @@ -299,11 +299,11 @@ ConnectionStatus ConnectionFileDescriptor::Connect(llvm::StringRef path, bool ConnectionFileDescriptor::InterruptRead() { size_t bytes_written = 0; - Error result = m_pipe.Write("i", 1, bytes_written); + Status result = m_pipe.Write("i", 1, bytes_written); return result.Success(); } -ConnectionStatus ConnectionFileDescriptor::Disconnect(Error *error_ptr) { +ConnectionStatus ConnectionFileDescriptor::Disconnect(Status *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("%p ConnectionFileDescriptor::Disconnect ()", @@ -337,7 +337,7 @@ ConnectionStatus ConnectionFileDescriptor::Disconnect(Error *error_ptr) { if (!locker.try_lock()) { if (m_pipe.CanWrite()) { size_t bytes_written = 0; - Error result = m_pipe.Write("q", 1, bytes_written); + Status result = m_pipe.Write("q", 1, bytes_written); if (log) log->Printf("%p ConnectionFileDescriptor::Disconnect(): Couldn't get " "the lock, sent 'q' to %d, error = '%s'.", @@ -351,8 +351,8 @@ ConnectionStatus ConnectionFileDescriptor::Disconnect(Error *error_ptr) { locker.lock(); } - Error error = m_read_sp->Close(); - Error error2 = m_write_sp->Close(); + Status error = m_read_sp->Close(); + Status error2 = m_write_sp->Close(); if (error.Fail() || error2.Fail()) status = eConnectionStatusError; if (error_ptr) @@ -369,7 +369,7 @@ ConnectionStatus ConnectionFileDescriptor::Disconnect(Error *error_ptr) { size_t ConnectionFileDescriptor::Read(void *dst, size_t dst_len, const Timeout<std::micro> &timeout, ConnectionStatus &status, - Error *error_ptr) { + Status *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); std::unique_lock<std::recursive_mutex> locker(m_mutex, std::defer_lock); @@ -394,7 +394,7 @@ size_t ConnectionFileDescriptor::Read(void *dst, size_t dst_len, if (status != eConnectionStatusSuccess) return 0; - Error error; + Status error; size_t bytes_read = dst_len; error = m_read_sp->Read(dst, bytes_read); @@ -476,7 +476,7 @@ size_t ConnectionFileDescriptor::Read(void *dst, size_t dst_len, size_t ConnectionFileDescriptor::Write(const void *src, size_t src_len, ConnectionStatus &status, - Error *error_ptr) { + Status *error_ptr) { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf( @@ -491,7 +491,7 @@ size_t ConnectionFileDescriptor::Write(const void *src, size_t src_len, return 0; } - Error error; + Status error; size_t bytes_sent = src_len; error = m_write_sp->Write(src, bytes_sent); @@ -553,7 +553,7 @@ std::string ConnectionFileDescriptor::GetURI() { return m_uri; } ConnectionStatus ConnectionFileDescriptor::BytesAvailable(const Timeout<std::micro> &timeout, - Error *error_ptr) { + Status *error_ptr) { // Don't need to take the mutex here separately since we are only called from // Read. If we // ever get used more generally we will need to lock here as well. @@ -588,7 +588,7 @@ ConnectionFileDescriptor::BytesAvailable(const Timeout<std::micro> &timeout, while (handle == m_read_sp->GetWaitableHandle()) { - Error error = select_helper.Select(); + Status error = select_helper.Select(); if (error_ptr) *error_ptr = error; @@ -653,9 +653,9 @@ ConnectionFileDescriptor::BytesAvailable(const Timeout<std::micro> &timeout, ConnectionStatus ConnectionFileDescriptor::NamedSocketAccept(llvm::StringRef socket_name, - Error *error_ptr) { + Status *error_ptr) { Socket *socket = nullptr; - Error error = + Status error = Socket::UnixDomainAccept(socket_name, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; @@ -670,9 +670,9 @@ ConnectionFileDescriptor::NamedSocketAccept(llvm::StringRef socket_name, ConnectionStatus ConnectionFileDescriptor::NamedSocketConnect(llvm::StringRef socket_name, - Error *error_ptr) { + Status *error_ptr) { Socket *socket = nullptr; - Error error = + Status error = Socket::UnixDomainConnect(socket_name, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; @@ -687,10 +687,10 @@ ConnectionFileDescriptor::NamedSocketConnect(llvm::StringRef socket_name, lldb::ConnectionStatus ConnectionFileDescriptor::UnixAbstractSocketConnect(llvm::StringRef socket_name, - Error *error_ptr) { + Status *error_ptr) { Socket *socket = nullptr; - Error error = Socket::UnixAbstractConnect(socket_name, - m_child_processes_inherit, socket); + Status error = Socket::UnixAbstractConnect(socket_name, + m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); @@ -704,13 +704,13 @@ ConnectionFileDescriptor::UnixAbstractSocketConnect(llvm::StringRef socket_name, ConnectionStatus ConnectionFileDescriptor::SocketListenAndAccept(llvm::StringRef s, - Error *error_ptr) { + Status *error_ptr) { m_port_predicate.SetValue(0, eBroadcastNever); Socket *socket = nullptr; m_waiting_for_accept = true; - Error error = Socket::TcpListen(s, m_child_processes_inherit, socket, - &m_port_predicate); + Status error = Socket::TcpListen(s, m_child_processes_inherit, socket, + &m_port_predicate); if (error_ptr) *error_ptr = error; if (error.Fail()) @@ -732,9 +732,9 @@ ConnectionFileDescriptor::SocketListenAndAccept(llvm::StringRef s, } ConnectionStatus ConnectionFileDescriptor::ConnectTCP(llvm::StringRef s, - Error *error_ptr) { + Status *error_ptr) { Socket *socket = nullptr; - Error error = Socket::TcpConnect(s, m_child_processes_inherit, socket); + Status error = Socket::TcpConnect(s, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); @@ -747,9 +747,9 @@ ConnectionStatus ConnectionFileDescriptor::ConnectTCP(llvm::StringRef s, } ConnectionStatus ConnectionFileDescriptor::ConnectUDP(llvm::StringRef s, - Error *error_ptr) { + Status *error_ptr) { Socket *socket = nullptr; - Error error = Socket::UdpConnect(s, m_child_processes_inherit, socket); + Status error = Socket::UdpConnect(s, m_child_processes_inherit, socket); if (error_ptr) *error_ptr = error; m_write_sp.reset(socket); |