diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-08-16 14:27:35 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-08-16 14:27:35 +0000 |
commit | 4c78b7882506957febf4318978d31b5aaae7cced (patch) | |
tree | 57b4c6df88edcf2ba5ae517d0a00a993630c3067 /lldb/source/Commands/CommandObjectCommands.cpp | |
parent | 213edc34922afa08f8cf070017fcd398b12f15a5 (diff) | |
download | bcm5719-llvm-4c78b7882506957febf4318978d31b5aaae7cced.tar.gz bcm5719-llvm-4c78b7882506957febf4318978d31b5aaae7cced.zip |
[lldb][NFC] Allow for-ranges on StringList
llvm-svn: 369113
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index e7f99e2316c..65fc8869edf 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -966,11 +966,9 @@ protected: if (m_regex_cmd_up) { StringList lines; if (lines.SplitIntoLines(data)) { - const size_t num_lines = lines.GetSize(); bool check_only = false; - for (size_t i = 0; i < num_lines; ++i) { - llvm::StringRef bytes_strref(lines[i]); - Status error = AppendRegexSubstitution(bytes_strref, check_only); + for (const std::string &line : lines) { + Status error = AppendRegexSubstitution(line, check_only); if (error.Fail()) { if (!GetDebugger().GetCommandInterpreter().GetBatchCommandMode()) { StreamSP out_stream = GetDebugger().GetAsyncOutputStream(); |