xref: /openbsd-src/gnu/llvm/lldb/source/Interpreter/OptionValueArgs.cpp (revision be691f3bb6417f04a68938fadbcaee2d5795e764)
1dda28197Spatrick //===-- OptionValueArgs.cpp -----------------------------------------------===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick 
9061da546Spatrick #include "lldb/Interpreter/OptionValueArgs.h"
10061da546Spatrick 
11061da546Spatrick #include "lldb/Utility/Args.h"
12061da546Spatrick 
13061da546Spatrick using namespace lldb;
14061da546Spatrick using namespace lldb_private;
15061da546Spatrick 
GetArgs(Args & args) const16*be691f3bSpatrick size_t OptionValueArgs::GetArgs(Args &args) const {
17061da546Spatrick   args.Clear();
18*be691f3bSpatrick   for (const auto &value : m_values) {
19061da546Spatrick     llvm::StringRef string_value = value->GetStringValue();
20061da546Spatrick     if (!string_value.empty())
21061da546Spatrick       args.AppendArgument(string_value);
22061da546Spatrick   }
23061da546Spatrick 
24061da546Spatrick   return args.GetArgumentCount();
25061da546Spatrick }
26