1*061da546Spatrick //===-- OptionValueArgs.cpp -------------------------------------*- C++ -*-===// 2*061da546Spatrick // 3*061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*061da546Spatrick // See https://llvm.org/LICENSE.txt for license information. 5*061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*061da546Spatrick // 7*061da546Spatrick //===----------------------------------------------------------------------===// 8*061da546Spatrick 9*061da546Spatrick #include "lldb/Interpreter/OptionValueArgs.h" 10*061da546Spatrick 11*061da546Spatrick #include "lldb/Utility/Args.h" 12*061da546Spatrick 13*061da546Spatrick using namespace lldb; 14*061da546Spatrick using namespace lldb_private; 15*061da546Spatrick 16*061da546Spatrick size_t OptionValueArgs::GetArgs(Args &args) { 17*061da546Spatrick args.Clear(); 18*061da546Spatrick for (auto value : m_values) { 19*061da546Spatrick llvm::StringRef string_value = value->GetStringValue(); 20*061da546Spatrick if (!string_value.empty()) 21*061da546Spatrick args.AppendArgument(string_value); 22*061da546Spatrick } 23*061da546Spatrick 24*061da546Spatrick return args.GetArgumentCount(); 25*061da546Spatrick } 26