summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-16 21:45:04 +0000
committerZachary Turner <zturner@google.com>2016-11-16 21:45:04 +0000
commit067d1db139b6f9d32f8cce8f5af8319613d523c1 (patch)
tree59853a98fcc5e79e8db7602011a19cfb08f32ec3 /lldb/source/Interpreter/CommandInterpreter.cpp
parent7a74803abf1423854792987492fe25e975bae9f8 (diff)
downloadbcm5719-llvm-067d1db139b6f9d32f8cce8f5af8319613d523c1.tar.gz
bcm5719-llvm-067d1db139b6f9d32f8cce8f5af8319613d523c1.zip
Make Apropos functions accept StringRefs.
llvm-svn: 287157
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 2047d4a4433..320214df233 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2596,19 +2596,19 @@ void CommandInterpreter::OutputHelpText(Stream &strm, llvm::StringRef word_text,
}
void CommandInterpreter::FindCommandsForApropos(
- const char *search_word, StringList &commands_found,
+ llvm::StringRef search_word, StringList &commands_found,
StringList &commands_help, CommandObject::CommandMap &command_map) {
CommandObject::CommandMap::const_iterator pos;
for (pos = command_map.begin(); pos != command_map.end(); ++pos) {
- const char *command_name = pos->first.c_str();
+ llvm::StringRef command_name = pos->first;
CommandObject *cmd_obj = pos->second.get();
const bool search_short_help = true;
const bool search_long_help = false;
const bool search_syntax = false;
const bool search_options = false;
- if (strcasestr(command_name, search_word) ||
+ if (command_name.contains_lower(search_word) ||
cmd_obj->HelpTextContainsWord(search_word, search_short_help,
search_long_help, search_syntax,
search_options)) {
@@ -2624,7 +2624,7 @@ void CommandInterpreter::FindCommandsForApropos(
}
}
-void CommandInterpreter::FindCommandsForApropos(const char *search_word,
+void CommandInterpreter::FindCommandsForApropos(llvm::StringRef search_word,
StringList &commands_found,
StringList &commands_help,
bool search_builtin_commands,
OpenPOWER on IntegriCloud