brintos

brintos / llvm-project-archived public Read only

0
0
Text · 804 B · cccdc3b Raw
24 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "lldb/Protocol/MCP/Transport.h"10#include "llvm/ADT/StringRef.h"11#include <utility>12 13using namespace lldb_protocol::mcp;14using namespace llvm;15 16Transport::Transport(lldb::IOObjectSP in, lldb::IOObjectSP out,17                     LogCallback log_callback)18    : JSONRPCTransport(in, out), m_log_callback(std::move(log_callback)) {}19 20void Transport::Log(StringRef message) {21  if (m_log_callback)22    m_log_callback(message);23}24