aboutsummaryrefslogtreecommitdiff
path: root/source/Core/StreamAsynchronousIO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Core/StreamAsynchronousIO.cpp')
-rw-r--r--source/Core/StreamAsynchronousIO.cpp43
1 files changed, 16 insertions, 27 deletions
diff --git a/source/Core/StreamAsynchronousIO.cpp b/source/Core/StreamAsynchronousIO.cpp
index 6f8fcce932e7..1f7e634dfe33 100644
--- a/source/Core/StreamAsynchronousIO.cpp
+++ b/source/Core/StreamAsynchronousIO.cpp
@@ -1,4 +1,4 @@
-//===-- StreamBroadcast.cpp -------------------------------------*- C++ -*-===//
+//===-- StreamAsynchronousIO.cpp --------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -9,40 +9,29 @@
#include "lldb/Core/StreamAsynchronousIO.h"
-#include "lldb/lldb-private.h"
#include "lldb/Core/Debugger.h"
+#include "lldb/lldb-private.h"
using namespace lldb;
using namespace lldb_private;
+StreamAsynchronousIO::StreamAsynchronousIO(Debugger &debugger, bool for_stdout)
+ : Stream(0, 4, eByteOrderBig), m_debugger(debugger), m_data(),
+ m_for_stdout(for_stdout) {}
-StreamAsynchronousIO::StreamAsynchronousIO (Debugger &debugger, bool for_stdout) :
- Stream (0, 4, eByteOrderBig),
- m_debugger (debugger),
- m_data (),
- m_for_stdout (for_stdout)
-{
-}
-
-StreamAsynchronousIO::~StreamAsynchronousIO ()
-{
- // Flush when we destroy to make sure we display the data
- Flush();
+StreamAsynchronousIO::~StreamAsynchronousIO() {
+ // Flush when we destroy to make sure we display the data
+ Flush();
}
-void
-StreamAsynchronousIO::Flush ()
-{
- if (!m_data.empty())
- {
- m_debugger.PrintAsync (m_data.data(), m_data.size(), m_for_stdout);
- m_data = std::string();
- }
+void StreamAsynchronousIO::Flush() {
+ if (!m_data.empty()) {
+ m_debugger.PrintAsync(m_data.data(), m_data.size(), m_for_stdout);
+ m_data = std::string();
+ }
}
-size_t
-StreamAsynchronousIO::Write (const void *s, size_t length)
-{
- m_data.append ((const char *)s, length);
- return length;
+size_t StreamAsynchronousIO::Write(const void *s, size_t length) {
+ m_data.append((const char *)s, length);
+ return length;
}