xref: /freebsd/contrib/llvm-project/lldb/source/Interpreter/OptionValueArgs.cpp (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
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 
9 #include "lldb/Interpreter/OptionValueArgs.h"
10 
11 #include "lldb/Utility/Args.h"
12 
13 using namespace lldb;
14 using namespace lldb_private;
15 
GetArgs(Args & args) const16 size_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 }
22