diff options
author | Zachary Turner <zturner@google.com> | 2016-12-09 05:46:41 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-12-09 05:46:41 +0000 |
commit | 2c84f908afc851a1ba83c6a8471a62db81475ef8 (patch) | |
tree | d51372b98dfbb090aafdab5dc233b32f790981d3 /lldb/source/Interpreter/Args.cpp | |
parent | 8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b (diff) | |
download | bcm5719-llvm-2c84f908afc851a1ba83c6a8471a62db81475ef8.tar.gz bcm5719-llvm-2c84f908afc851a1ba83c6a8471a62db81475ef8.zip |
Remove some more uses of Args::GetArgumentAtIndex.
llvm-svn: 289188
Diffstat (limited to 'lldb/source/Interpreter/Args.cpp')
-rw-r--r-- | lldb/source/Interpreter/Args.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp index 1e86deafb5f..c428a2352ca 100644 --- a/lldb/source/Interpreter/Args.cpp +++ b/lldb/source/Interpreter/Args.cpp @@ -1100,23 +1100,22 @@ std::string Args::ParseAliasOptions(Options &options, continue; if (!result_string.empty()) { - const char *tmp_arg = GetArgumentAtIndex(idx); + auto tmp_arg = m_entries[idx].ref; size_t pos = result_string.find(tmp_arg); if (pos != std::string::npos) - result_string.erase(pos, strlen(tmp_arg)); + result_string.erase(pos, tmp_arg.size()); } ReplaceArgumentAtIndex(idx, llvm::StringRef()); if ((long_options[long_options_index].definition->option_has_arg != OptionParser::eNoArgument) && (OptionParser::GetOptionArgument() != nullptr) && (idx + 1 < GetArgumentCount()) && - (strcmp(OptionParser::GetOptionArgument(), - GetArgumentAtIndex(idx + 1)) == 0)) { + (m_entries[idx + 1].ref == OptionParser::GetOptionArgument())) { if (result_string.size() > 0) { - const char *tmp_arg = GetArgumentAtIndex(idx + 1); + auto tmp_arg = m_entries[idx + 1].ref; size_t pos = result_string.find(tmp_arg); if (pos != std::string::npos) - result_string.erase(pos, strlen(tmp_arg)); + result_string.erase(pos, tmp_arg.size()); } ReplaceArgumentAtIndex(idx + 1, llvm::StringRef()); } |