summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueBoolean.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueBoolean.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueBoolean.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/OptionValueBoolean.cpp b/lldb/source/Interpreter/OptionValueBoolean.cpp
index 8a340792d78..94c774d6911 100644
--- a/lldb/source/Interpreter/OptionValueBoolean.cpp
+++ b/lldb/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();
}
OpenPOWER on IntegriCloud