Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
793 B
C++
Raw Permalink Normal View History

//===-- StreamCallback.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
2017-03-06 18:34:25 +00:00
#include "lldb/Utility/StreamCallback.h"
2017-04-06 18:12:24 +00:00
#include <string>
using namespace lldb_private;
StreamCallback::StreamCallback(lldb::LogOutputCallback callback, void *baton)
2017-02-10 11:49:21 +00:00
: llvm::raw_ostream(true), m_callback(callback), m_baton(baton) {}
2017-02-10 11:49:21 +00:00
void StreamCallback::write_impl(const char *Ptr, size_t Size) {
m_callback(std::string(Ptr, Size).c_str(), m_baton);
}
2017-02-10 11:49:21 +00:00
uint64_t StreamCallback::current_pos() const { return 0; }