[Lldb-commits] [PATCH] D84179: [lldb] tab completion for `platform target-install`
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 10 11:15:32 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe3820570d406: [lldb] tab completion for `platform target-install` (authored by MrHate, committed by teemperor).
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84179/new/
https://reviews.llvm.org/D84179
Files:
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/test/API/functionalities/completion/TestCompletion.py
Index: lldb/test/API/functionalities/completion/TestCompletion.py
===================================================================
--- lldb/test/API/functionalities/completion/TestCompletion.py
+++ lldb/test/API/functionalities/completion/TestCompletion.py
@@ -426,6 +426,9 @@
self.runCmd("frame recognizer add -l py_class -s module_name -n recognizer_name")
self.check_completion_with_desc('frame recognizer delete ', [['0', 'py_class, module module_name, symbol recognizer_name']])
+ def test_platform_install_local_file(self):
+ self.complete_from_to('platform target-install main.cp', 'platform target-install main.cpp')
+
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
def test_symbol_name(self):
self.build()
Index: lldb/source/Commands/CommandObjectPlatform.cpp
===================================================================
--- lldb/source/Commands/CommandObjectPlatform.cpp
+++ lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1706,6 +1706,16 @@
~CommandObjectPlatformInstall() override = default;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override {
+ if (request.GetCursorIndex())
+ return;
+ CommandCompletions::InvokeCommonCompletionCallbacks(
+ GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
+ request, nullptr);
+ }
+
bool DoExecute(Args &args, CommandReturnObject &result) override {
if (args.GetArgumentCount() != 2) {
result.AppendError("platform target-install takes two arguments");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84179.284454.patch
Type: text/x-patch
Size: 1643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200810/63b3dce2/attachment.bin>
More information about the lldb-commits
mailing list