[Lldb-commits] [lldb] b2faf30 - [lldb][NFC] Make OptionValueArgs::GetArgs constant
Tatyana Krasnukha via lldb-commits
lldb-commits at lists.llvm.org
Sun Feb 28 08:24:24 PST 2021
Author: Tatyana Krasnukha
Date: 2021-02-28T19:23:20+03:00
New Revision: b2faf30189449a894b5c1cb2bb6b0cc04986c7fe
URL: https://github.com/llvm/llvm-project/commit/b2faf30189449a894b5c1cb2bb6b0cc04986c7fe
DIFF: https://github.com/llvm/llvm-project/commit/b2faf30189449a894b5c1cb2bb6b0cc04986c7fe.diff
LOG: [lldb][NFC] Make OptionValueArgs::GetArgs constant
Added:
Modified:
lldb/include/lldb/Interpreter/OptionValueArgs.h
lldb/source/Interpreter/OptionValueArgs.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Interpreter/OptionValueArgs.h b/lldb/include/lldb/Interpreter/OptionValueArgs.h
index 2ef6ca5573e9..8cea8ced74de 100644
--- a/lldb/include/lldb/Interpreter/OptionValueArgs.h
+++ b/lldb/include/lldb/Interpreter/OptionValueArgs.h
@@ -21,7 +21,7 @@ class OptionValueArgs : public OptionValueArray {
~OptionValueArgs() override = default;
- size_t GetArgs(Args &args);
+ size_t GetArgs(Args &args) const;
Type GetType() const override { return eTypeArgs; }
};
diff --git a/lldb/source/Interpreter/OptionValueArgs.cpp b/lldb/source/Interpreter/OptionValueArgs.cpp
index 9e7774a231c7..bdb5f486835a 100644
--- a/lldb/source/Interpreter/OptionValueArgs.cpp
+++ b/lldb/source/Interpreter/OptionValueArgs.cpp
@@ -13,9 +13,9 @@
using namespace lldb;
using namespace lldb_private;
-size_t OptionValueArgs::GetArgs(Args &args) {
+size_t OptionValueArgs::GetArgs(Args &args) const {
args.Clear();
- for (auto value : m_values) {
+ for (const auto &value : m_values) {
llvm::StringRef string_value = value->GetStringValue();
if (!string_value.empty())
args.AppendArgument(string_value);
More information about the lldb-commits
mailing list