LLDB  mainline
OptionValueArgs.cpp
Go to the documentation of this file.
1 //===-- OptionValueArgs.cpp -------------------------------------*- C++ -*-===//
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 
13 using namespace lldb;
14 using namespace lldb_private;
15 
16 size_t OptionValueArgs::GetArgs(Args &args) {
17  args.Clear();
18  for (auto value : m_values) {
19  llvm::StringRef string_value = value->GetStringValue();
20  if (!string_value.empty())
21  args.AppendArgument(string_value);
22  }
23 
24  return args.GetArgumentCount();
25 }
A command line argument class.
Definition: Args.h:32
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
Definition: Args.cpp:254
Definition: SBAddress.h:15
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:321