2020-07-26 15:36:28 -04:00
|
|
|
//===-- OptionValueArgs.cpp -----------------------------------------------===//
|
2013-08-23 13:46:38 -04:00
|
|
|
//
|
2019-08-20 16:51:52 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-08-23 13:46:38 -04:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
#include "lldb/Interpreter/OptionValueArgs.h"
|
|
|
|
|
|
2018-07-28 07:09:23 -04:00
|
|
|
#include "lldb/Utility/Args.h"
|
2013-08-23 13:46:38 -04:00
|
|
|
|
|
|
|
|
using namespace lldb;
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
size_t OptionValueArgs::GetArgs(Args &args) {
|
|
|
|
|
args.Clear();
|
|
|
|
|
for (auto value : m_values) {
|
|
|
|
|
llvm::StringRef string_value = value->GetStringValue();
|
|
|
|
|
if (!string_value.empty())
|
|
|
|
|
args.AppendArgument(string_value);
|
|
|
|
|
}
|
2013-08-23 13:46:38 -04:00
|
|
|
|
2017-01-02 14:26:05 -05:00
|
|
|
return args.GetArgumentCount();
|
2013-08-23 13:46:38 -04:00
|
|
|
}
|