Currently empty arguments are not respected. They are silently dropped
in two places: (1) when extracting them from the target.run-args
setting and (2) when constructing the lldb-argdumper invocation.
(1) is actually a regression from a few years ago. We did not always
drop empty arguments. See 31d97a5c8a.
rdar://106279228
Differential Revision: https://reviews.llvm.org/D145450
25 lines
749 B
C++
25 lines
749 B
C++
//===-- OptionValueArgs.cpp -----------------------------------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "lldb/Interpreter/OptionValueArgs.h"
|
|
|
|
#include "lldb/Utility/Args.h"
|
|
|
|
using namespace lldb;
|
|
using namespace lldb_private;
|
|
|
|
size_t OptionValueArgs::GetArgs(Args &args) const {
|
|
args.Clear();
|
|
for (const auto &value : m_values) {
|
|
llvm::StringRef string_value = value->GetStringValue();
|
|
args.AppendArgument(string_value);
|
|
}
|
|
|
|
return args.GetArgumentCount();
|
|
}
|