summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueFormatEntity.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-07-13 18:28:14 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-07-13 18:28:14 +0000
commita2e76c0bfc5bec8d50e8d13f71b72a66eaa0a386 (patch)
tree55563c896d181a4de6dc254f335c10a379e0eac0 /lldb/source/Interpreter/OptionValueFormatEntity.cpp
parentd6c062bce1e499f52500cc759a7c0846dd178cda (diff)
downloadbcm5719-llvm-a2e76c0bfc5bec8d50e8d13f71b72a66eaa0a386.tar.gz
bcm5719-llvm-a2e76c0bfc5bec8d50e8d13f71b72a66eaa0a386.zip
Replaced more boilerplate code with CompletionRequest (NFC)
Summary: As suggested in D48796, this patch replaces even more internal calls that were using the old completion API style with a single CompletionRequest. In some cases we also pass an option vector/index, but as we don't always have this information, it currently is not part of the CompletionRequest class. The constructor of the CompletionRequest is now also more sensible. You only pass the user input, cursor position and your list of matches to the request and the rest will be inferred (using the same code we used before to calculate this). You also have to pass these match window parameters to it, even though they are unused right now. The patch shouldn't change any behavior. Reviewers: jingham Reviewed By: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D48976 llvm-svn: 337031
Diffstat (limited to 'lldb/source/Interpreter/OptionValueFormatEntity.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueFormatEntity.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/OptionValueFormatEntity.cpp b/lldb/source/Interpreter/OptionValueFormatEntity.cpp
index dc9afeac938..ce1a84e8dec 100644
--- a/lldb/source/Interpreter/OptionValueFormatEntity.cpp
+++ b/lldb/source/Interpreter/OptionValueFormatEntity.cpp
@@ -105,9 +105,7 @@ lldb::OptionValueSP OptionValueFormatEntity::DeepCopy() const {
return OptionValueSP(new OptionValueFormatEntity(*this));
}
-size_t OptionValueFormatEntity::AutoComplete(
- CommandInterpreter &interpreter, llvm::StringRef s, int match_start_point,
- int max_return_elements, bool &word_complete, StringList &matches) {
- return FormatEntity::AutoComplete(s, match_start_point, max_return_elements,
- word_complete, matches);
+size_t OptionValueFormatEntity::AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) {
+ return FormatEntity::AutoComplete(request);
}
OpenPOWER on IntegriCloud