summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/windows/PipeWindows.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-11-11 04:28:40 +0000
commit41af43092ccc8030bb49cea324d85eecd5ae68a8 (patch)
treef30038673dd27f2d4785068fffd510abe4fb23d7 /lldb/source/Host/windows/PipeWindows.cpp
parente8e98dcb74cd6d297c31c023bfacdf7f28cdaabc (diff)
downloadbcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.tar.gz
bcm5719-llvm-41af43092ccc8030bb49cea324d85eecd5ae68a8.zip
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
Diffstat (limited to 'lldb/source/Host/windows/PipeWindows.cpp')
-rw-r--r--lldb/source/Host/windows/PipeWindows.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Host/windows/PipeWindows.cpp b/lldb/source/Host/windows/PipeWindows.cpp
index 407f0468e6c..64b65847506 100644
--- a/lldb/source/Host/windows/PipeWindows.cpp
+++ b/lldb/source/Host/windows/PipeWindows.cpp
@@ -161,7 +161,7 @@ Error PipeWindows::OpenNamedPipe(llvm::StringRef name,
ZeroMemory(&m_write_overlapped, sizeof(m_write_overlapped));
}
- return Error();
+ return Error::success();
}
int PipeWindows::GetReadFileDescriptor() const { return m_read_fd; }
@@ -217,7 +217,7 @@ void PipeWindows::Close() {
CloseWriteFileDescriptor();
}
-Error PipeWindows::Delete(llvm::StringRef name) { return Error(); }
+Error PipeWindows::Delete(llvm::StringRef name) { return Error::success(); }
bool PipeWindows::CanRead() const { return (m_read != INVALID_HANDLE_VALUE); }
@@ -273,7 +273,7 @@ Error PipeWindows::ReadWithTimeout(void *buf, size_t size,
return Error(::GetLastError(), eErrorTypeWin32);
bytes_read = sys_bytes_read;
- return Error();
+ return Error::success();
}
Error PipeWindows::Write(const void *buf, size_t num_bytes,
@@ -291,5 +291,5 @@ Error PipeWindows::Write(const void *buf, size_t num_bytes,
&sys_bytes_written, TRUE);
if (!result)
return Error(::GetLastError(), eErrorTypeWin32);
- return Error();
+ return Error::success();
}
OpenPOWER on IntegriCloud