LLDB mainline
Transport.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/ADT/StringRef.h"
11#include <utility>
12
13using namespace lldb_protocol::mcp;
14using namespace llvm;
15
17 LogCallback log_callback)
18 : JSONRPCTransport(in, out), m_log_callback(std::move(log_callback)) {}
19
20void Transport::Log(StringRef message) {
22 m_log_callback(message);
23}
Transport(lldb::IOObjectSP in, lldb::IOObjectSP out, LogCallback log_callback={})
Definition Transport.cpp:16
void Log(llvm::StringRef message) override
llvm::unique_function< void(llvm::StringRef message)> LogCallback
Generic logging callback, to allow the MCP server / client / transport layer to be independent of the...
Definition Transport.h:25
std::shared_ptr< lldb_private::IOObject > IOObjectSP