John Harrison 65f60fd465
[lldb] Moving MCPTransport into its own file. (#156712)
Moving `lldb_protocol::mcp::MCPTransport` into its own file and renaming
to `lldb_protocol::mcp::Transport`.
2025-09-04 08:52:33 -07:00

24 lines
804 B
C++

//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "lldb/Protocol/MCP/Transport.h"
#include "llvm/ADT/StringRef.h"
#include <utility>
using namespace lldb_protocol::mcp;
using namespace llvm;
Transport::Transport(lldb::IOObjectSP in, lldb::IOObjectSP out,
LogCallback log_callback)
: JSONRPCTransport(in, out), m_log_callback(std::move(log_callback)) {}
void Transport::Log(StringRef message) {
if (m_log_callback)
m_log_callback(message);
}