brintos

brintos / llvm-project-archived public Read only

0
0
Text · 941 B · 8f71f88 Raw
30 lines · cpp
1//===-- Transport.cpp -----------------------------------------------------===//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 "Transport.h"10#include "DAPLog.h"11#include "lldb/lldb-forward.h"12#include "llvm/ADT/StringRef.h"13 14using namespace llvm;15using namespace lldb;16using namespace lldb_private;17 18namespace lldb_dap {19 20Transport::Transport(llvm::StringRef client_name, lldb_dap::Log *log,21                     lldb::IOObjectSP input, lldb::IOObjectSP output)22    : HTTPDelimitedJSONTransport(input, output), m_client_name(client_name),23      m_log(log) {}24 25void Transport::Log(llvm::StringRef message) {26  DAP_LOG(m_log, "({0}) {1}", m_client_name, message);27}28 29} // namespace lldb_dap30