teak-llvm/lldb/source/Core/StreamAsynchronousIO.cpp
Alexander Shaposhnikov 696bd63550 [lldb] Fix typos in file headers
This diff fixes typos in file headers (incorrect file names).

Test plan:

Under llvm/tools/lldb/source:
find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done

Differential revision: https://reviews.llvm.org/D27115

llvm-svn: 287966
2016-11-26 05:23:44 +00:00

38 lines
1.1 KiB
C++

//===-- StreamAsynchronousIO.cpp --------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Core/StreamAsynchronousIO.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() {
// 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();
}
}
size_t StreamAsynchronousIO::Write(const void *s, size_t length) {
m_data.append((const char *)s, length);
return length;
}