diff options
author | Zachary Turner <zturner@google.com> | 2016-11-22 17:10:15 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-11-22 17:10:15 +0000 |
commit | d6a24757876e7c1d29113f41ea241db262d9609c (patch) | |
tree | 8bc7a925d2d5bb5cc73b321929e7414f19947577 /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | 04dc211e6aa5936caf72297e2c305d2ae23096dd (diff) | |
download | llvm-d6a24757876e7c1d29113f41ea241db262d9609c.zip llvm-d6a24757876e7c1d29113f41ea241db262d9609c.tar.gz llvm-d6a24757876e7c1d29113f41ea241db262d9609c.tar.bz2 |
Re-add "demonstrate new Args API"
This fixes the build breakage due to the use of C++14.
llvm-svn: 287647
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index fd3795e..5b7f134 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -1558,9 +1558,8 @@ protected: int num_signals_set = 0; if (num_args > 0) { - for (size_t i = 0; i < num_args; ++i) { - int32_t signo = signals_sp->GetSignalNumberFromName( - signal_args.GetArgumentAtIndex(i)); + for (const auto &arg : signal_args) { + int32_t signo = signals_sp->GetSignalNumberFromName(arg.c_str()); if (signo != LLDB_INVALID_SIGNAL_NUMBER) { // Casting the actions as bools here should be okay, because // VerifyCommandOptionValue guarantees @@ -1576,7 +1575,7 @@ protected: ++num_signals_set; } else { result.AppendErrorWithFormat("Invalid signal name '%s'\n", - signal_args.GetArgumentAtIndex(i)); + arg.c_str()); } } } else { |