diff options
Diffstat (limited to 'include/lldb/Interpreter/CommandCompletions.h')
-rw-r--r-- | include/lldb/Interpreter/CommandCompletions.h | 87 |
1 files changed, 38 insertions, 49 deletions
diff --git a/include/lldb/Interpreter/CommandCompletions.h b/include/lldb/Interpreter/CommandCompletions.h index 3d09db5ce5e7..275cc7e7c145 100644 --- a/include/lldb/Interpreter/CommandCompletions.h +++ b/include/lldb/Interpreter/CommandCompletions.h @@ -26,10 +26,10 @@ public: // This is the command completion callback that is used to complete the // argument of the option it is bound to (in the OptionDefinition table // below). Return the total number of matches. - typedef int (*CompletionCallback)(CommandInterpreter &interpreter, - CompletionRequest &request, - // A search filter to limit the search... - lldb_private::SearchFilter *searcher); + typedef void (*CompletionCallback)(CommandInterpreter &interpreter, + CompletionRequest &request, + // A search filter to limit the search... + lldb_private::SearchFilter *searcher); enum CommonCompletionTypes { eNoCompletion = 0u, eSourceFileCompletion = (1u << 0), @@ -57,42 +57,42 @@ public: lldb_private::CompletionRequest &request, SearchFilter *searcher); // These are the generic completer functions: - static int DiskFiles(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void DiskFiles(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); - static int DiskFiles(const llvm::Twine &partial_file_name, - StringList &matches, TildeExpressionResolver &Resolver); + static void DiskFiles(const llvm::Twine &partial_file_name, + StringList &matches, TildeExpressionResolver &Resolver); - static int DiskDirectories(CommandInterpreter &interpreter, - CompletionRequest &request, - SearchFilter *searcher); + static void DiskDirectories(CommandInterpreter &interpreter, + CompletionRequest &request, + SearchFilter *searcher); - static int DiskDirectories(const llvm::Twine &partial_file_name, - StringList &matches, - TildeExpressionResolver &Resolver); + static void DiskDirectories(const llvm::Twine &partial_file_name, + StringList &matches, + TildeExpressionResolver &Resolver); - static int SourceFiles(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void SourceFiles(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); - static int Modules(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void Modules(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); - static int Symbols(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void Symbols(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); - static int SettingsNames(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void SettingsNames(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); - static int PlatformPluginNames(CommandInterpreter &interpreter, - CompletionRequest &request, - SearchFilter *searcher); + static void PlatformPluginNames(CommandInterpreter &interpreter, + CompletionRequest &request, + SearchFilter *searcher); - static int ArchitectureNames(CommandInterpreter &interpreter, - CompletionRequest &request, - SearchFilter *searcher); + static void ArchitectureNames(CommandInterpreter &interpreter, + CompletionRequest &request, + SearchFilter *searcher); - static int VariablePath(CommandInterpreter &interpreter, - CompletionRequest &request, SearchFilter *searcher); + static void VariablePath(CommandInterpreter &interpreter, + CompletionRequest &request, SearchFilter *searcher); // The Completer class is a convenient base class for building searchers that // go along with the SearchFilter passed to the standard Completer functions. @@ -103,11 +103,11 @@ public: ~Completer() override; CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, - Address *addr, bool complete) override = 0; + Address *addr) override = 0; lldb::SearchDepth GetDepth() override = 0; - virtual size_t DoCompletion(SearchFilter *filter) = 0; + virtual void DoCompletion(SearchFilter *filter) = 0; protected: CommandInterpreter &m_interpreter; @@ -127,10 +127,9 @@ public: Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, - Address *addr, - bool complete) override; + Address *addr) override; - size_t DoCompletion(SearchFilter *filter) override; + void DoCompletion(SearchFilter *filter) override; private: bool m_include_support_files; @@ -151,10 +150,9 @@ public: Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, - Address *addr, - bool complete) override; + Address *addr) override; - size_t DoCompletion(SearchFilter *filter) override; + void DoCompletion(SearchFilter *filter) override; private: const char *m_file_name; @@ -173,20 +171,11 @@ public: Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, - Address *addr, - bool complete) override; + Address *addr) override; - size_t DoCompletion(SearchFilter *filter) override; + void DoCompletion(SearchFilter *filter) override; private: - // struct NameCmp { - // bool operator() (const ConstString& lhs, const ConstString& - // rhs) const - // { - // return lhs < rhs; - // } - // }; - RegularExpression m_regex; typedef std::set<ConstString> collection; collection m_match_set; |