1 //===-- ScriptedInterfaceUsages.cpp --------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Interpreter/Interfaces/ScriptedInterfaceUsages.h"
12 using namespace lldb_private
;
14 void ScriptedInterfaceUsages::Dump(Stream
&s
, UsageKind kind
) const {
17 llvm::StringRef usage_kind
=
18 (kind
== UsageKind::CommandInterpreter
) ? "Command Interpreter" : "API";
19 s
<< usage_kind
<< " Usages:";
20 const std::vector
<llvm::StringRef
> &usages
=
21 (kind
== UsageKind::CommandInterpreter
) ? GetCommandInterpreterUsages()
25 else if (usages
.size() == 1)
26 s
<< " " << usages
.front() << '\n';
29 for (llvm::StringRef usage
: usages
) {