diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-25 12:40:01 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-25 12:40:01 +0000 |
commit | 823fd9508ad4b47ee1d8a5a9dae5fada01e11e29 (patch) | |
tree | 23b45682b73209a6020502e35c046b41bd7d2078 /lldb/source/Interpreter | |
parent | b9683d3c53d6043d7cbeabf451860c027557be96 (diff) | |
download | bcm5719-llvm-823fd9508ad4b47ee1d8a5a9dae5fada01e11e29.tar.gz bcm5719-llvm-823fd9508ad4b47ee1d8a5a9dae5fada01e11e29.zip |
[lldb][NFC] Add CompletionRequest::AppendEmptyArgument
This is the only legitimate use we currently have for modifying
a CompletionRequest. Add a utility function for this purpose
and remove the remaining setters which go against the idea of
having an immutable CompletionRequest.
llvm-svn: 372858
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 10a80653168..71f766ed7b5 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1779,9 +1779,7 @@ void CommandInterpreter::HandleCompletionMatches(CompletionRequest &request) { look_for_subcommand = true; new_matches.DeleteStringAtIndex(0); new_descriptions.DeleteStringAtIndex(0); - request.GetParsedLine().AppendArgument(llvm::StringRef()); - request.SetCursorIndex(request.GetCursorIndex() + 1U); - request.SetCursorCharPosition(0); + request.AppendEmptyArgument(); } } request.AddCompletions(new_matches, new_descriptions); |