Skip to content

Commit a5866e6

Browse files
committed
Target::GetTargetSessionName returns llvm::StringRef
1 parent beae076 commit a5866e6

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

lldb/include/lldb/Target/Target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ class Target : public std::enable_shared_from_this<Target>,
631631
///
632632
/// \return
633633
/// The target session name for this target.
634-
const std::string &GetTargetSessionName() { return m_target_session_name; }
634+
llvm::StringRef GetTargetSessionName() { return m_target_session_name; }
635635

636636
/// Set the target session name for this target.
637637
///

lldb/source/API/SBTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ const char *SBTarget::GetTargetSessionName() const {
16451645
LLDB_INSTRUMENT_VA(this);
16461646

16471647
if (TargetSP target_sp = GetSP())
1648-
return ConstString(target_sp->GetTargetSessionName().data()).AsCString();
1648+
return ConstString(target_sp->GetTargetSessionName()).AsCString();
16491649
return nullptr;
16501650
}
16511651

lldb/tools/lldb-dap/DAPSessionManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- DAPSessionManager.cpp ----------------------------------*- C++ -*-===//
1+
//===----------------------------------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

lldb/tools/lldb-dap/DAPSessionManager.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
//===-- DAPSessionManager.h ------------------------------------*- C++ -*-===//
1+
//===----------------------------------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
///
9+
/// \file
10+
/// This file contains the declarations of the DAPSessionManager and ManagedEventThread classes,
11+
/// which are used to multiple concurrent DAP sessions in a single lldb-dap process.
12+
///
13+
//===----------------------------------------------------------------------===//
814

915
#ifndef LLDB_TOOLS_LLDB_DAP_DAPSESSIONMANAGER_H
1016
#define LLDB_TOOLS_LLDB_DAP_DAPSESSIONMANAGER_H

0 commit comments

Comments
 (0)