summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectSettings.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-21 23:18:07 +0000
committerZachary Turner <zturner@google.com>2016-11-21 23:18:07 +0000
commit1c55c9b5bf820a25ecf040fc3a5a1488b1d65cb2 (patch)
tree2ca0a559a8f8c36f3055919c15f379cfaf71df79 /lldb/source/Commands/CommandObjectSettings.cpp
parentc2cd4e004c4b34d8be0333b3dfe80831661bf11d (diff)
downloadbcm5719-llvm-1c55c9b5bf820a25ecf040fc3a5a1488b1d65cb2.tar.gz
bcm5719-llvm-1c55c9b5bf820a25ecf040fc3a5a1488b1d65cb2.zip
Add the new Args / entry-access API.
The long-term goal here is to get rid of the functions GetArgumentAtIndex() and GetQuoteCharAtIndex(), instead replacing them with operator based access and range-based for enumeration. There are a lot of callsites, though, so the changes will be done incrementally, starting with this one. Differential Revision: https://reviews.llvm.org/D26883 llvm-svn: 287597
Diffstat (limited to 'lldb/source/Commands/CommandObjectSettings.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 0a97804fbf6..23fdcb9e895 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -293,15 +293,10 @@ protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
result.SetStatus(eReturnStatusSuccessFinishResult);
- const size_t argc = args.GetArgumentCount();
if (!args.empty()) {
- // TODO: Convert this to StringRef based enumeration. Requires converting
- // DumpPropertyValue first.
- for (size_t i = 0; i < argc; ++i) {
- const char *property_path = args.GetArgumentAtIndex(i);
-
+ for (const auto &arg : args) {
Error error(m_interpreter.GetDebugger().DumpPropertyValue(
- &m_exe_ctx, result.GetOutputStream(), property_path,
+ &m_exe_ctx, result.GetOutputStream(), arg.ref,
OptionValue::eDumpGroupValue));
if (error.Success()) {
result.GetOutputStream().EOL();
OpenPOWER on IntegriCloud