LLDB mainline
OptionValueArgs.cpp
Go to the documentation of this file.
1//===-- OptionValueArgs.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-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11#include "lldb/Utility/Args.h"
12
13using namespace lldb;
14using namespace lldb_private;
15
16size_t OptionValueArgs::GetArgs(Args &args) const {
17 args.Clear();
18 for (const auto &value : m_values)
19 args.AppendArgument(value->GetValueAs<llvm::StringRef>().value_or(""));
20 return args.GetArgumentCount();
21}
A command line argument class.
Definition: Args.h:33
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.h:116
void AppendArgument(llvm::StringRef arg_str, char quote_char='\0')
Appends a new argument to the end of the list argument list.
Definition: Args.cpp:322
void Clear()
Clear the arguments.
Definition: Args.cpp:378
size_t GetArgs(Args &args) const
A class that represents a running process on the host machine.
Definition: SBAddress.h:15