-//====-- UserSettingsController.h --------------------------------*- C++
-//-*-===//
+//====-- UserSettingsController.h --------------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
virtual void DumpAllDescriptions(CommandInterpreter &interpreter,
Stream &strm) const;
- size_t Apropos(const char *keyword,
+ size_t Apropos(llvm::StringRef keyword,
std::vector<const Property *> &matching_properties) const;
lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
bool GetSynchronous();
- void FindCommandsForApropos(const char *word, StringList &commands_found,
+ void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found,
StringList &commands_help,
bool search_builtin_commands,
bool search_user_commands,
CommandObject *ResolveCommandImpl(std::string &command_line,
CommandReturnObject &result);
- void FindCommandsForApropos(const char *word, StringList &commands_found,
+ void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found,
StringList &commands_help,
CommandObject::CommandMap &command_map);
virtual void DumpAllDescriptions(CommandInterpreter &interpreter,
Stream &strm) const;
- void Apropos(const char *keyword,
+ void Apropos(llvm::StringRef keyword,
std::vector<const Property *> &matching_properties) const;
void Initialize(const PropertyDefinition *setting_definitions);
}
size_t
-Properties::Apropos(const char *keyword,
+Properties::Apropos(llvm::StringRef keyword,
std::vector<const Property *> &matching_properties) const {
OptionValuePropertiesSP properties_sp(GetValueProperties());
if (properties_sp) {
}
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)) {
}
}
-void CommandInterpreter::FindCommandsForApropos(const char *search_word,
+void CommandInterpreter::FindCommandsForApropos(llvm::StringRef search_word,
StringList &commands_found,
StringList &commands_help,
bool search_builtin_commands,
-//===-- OptionValueProperties.cpp ---------------------------------*- C++
-//-*-===//
+//===-- OptionValueProperties.cpp --------------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
}
void OptionValueProperties::Apropos(
- const char *keyword,
+ llvm::StringRef keyword,
std::vector<const Property *> &matching_properties) const {
const size_t num_properties = m_properties.size();
StreamString strm;