summaryrefslogtreecommitdiff
path: root/source/Interpreter/OptionValueBoolean.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:54 +0000
commit39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (patch)
tree37fd694b2fe544b0ccefb369794632592d138dde /source/Interpreter/OptionValueBoolean.cpp
parentf73363f1dd94996356cefbf24388f561891acf0b (diff)
Notes
Diffstat (limited to 'source/Interpreter/OptionValueBoolean.cpp')
-rw-r--r--source/Interpreter/OptionValueBoolean.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/Interpreter/OptionValueBoolean.cpp b/source/Interpreter/OptionValueBoolean.cpp
index 8a340792d78ff..94c774d691118 100644
--- a/source/Interpreter/OptionValueBoolean.cpp
+++ b/source/Interpreter/OptionValueBoolean.cpp
@@ -79,7 +79,6 @@ lldb::OptionValueSP OptionValueBoolean::DeepCopy() const {
size_t OptionValueBoolean::AutoComplete(CommandInterpreter &interpreter,
CompletionRequest &request) {
request.SetWordComplete(false);
- request.GetMatches().Clear();
static const llvm::StringRef g_autocomplete_entries[] = {
"true", "false", "on", "off", "yes", "no", "1", "0"};
@@ -91,7 +90,7 @@ size_t OptionValueBoolean::AutoComplete(CommandInterpreter &interpreter,
for (auto entry : entries) {
if (entry.startswith_lower(request.GetCursorArgumentPrefix()))
- request.GetMatches().AppendString(entry);
+ request.AddCompletion(entry);
}
- return request.GetMatches().GetSize();
+ return request.GetNumberOfMatches();
}