summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Variable.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/Symbol/Variable.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/Symbol/Variable.cpp')
-rw-r--r--lldb/source/Symbol/Variable.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index 4aa6a717c15..7eafef1e895 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -756,13 +756,13 @@ static void PrivateAutoComplete(
}
size_t Variable::AutoComplete(const ExecutionContext &exe_ctx,
- llvm::StringRef partial_path, StringList &matches,
- bool &word_complete) {
- word_complete = false;
+ CompletionRequest &request) {
CompilerType compiler_type;
- PrivateAutoComplete(exe_ctx.GetFramePtr(), partial_path, "", compiler_type,
- matches, word_complete);
+ bool word_complete = false;
+ PrivateAutoComplete(exe_ctx.GetFramePtr(), request.GetCursorArgumentPrefix(),
+ "", compiler_type, request.GetMatches(), word_complete);
+ request.SetWordComplete(word_complete);
- return matches.GetSize();
+ return request.GetMatches().GetSize();
}
OpenPOWER on IntegriCloud