From 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 2 Aug 2018 17:33:54 +0000 Subject: Vendor import of lldb trunk r338536: https://llvm.org/svn/llvm-project/lldb/trunk@338536 --- source/Interpreter/OptionValueBoolean.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/Interpreter/OptionValueBoolean.cpp') 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(); } -- cgit v1.2.3