[llvm-dev] Autocompletion support for llvm opt flags

Yuka Takahashi via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 26 10:40:39 PDT 2017


Hi all,

Thank you for your feedback at the dev meeting.

We are planning to add --autocomplete flag to llvm-opt, which enables us to
make a new command-line autocompletion for opt when -mllvm is provided to
Clang command invocation.

There are command-line option's namespace opt::cl in CommandLine.cpp, which
provides useful function for parsing options. However we also have OptTable
in OptTable.h and we are confused why they have similar classes for options.

Our implementation plan is to build a new OptTable for opt options defined
in CommandFlags.h with their values and call its method when --autocomplete
flag was passed to opt. We believe that this interface will also be useful
to future development for opt command-line flags.

Additionally, these are the type of flags which we already supported:
* Clang flags
* Clang flag values
* CC1 flags when -Xclang or -cc1 is provided to command-line
* -W<warning> and -Wno<warning>
* -analyzer-checker values
* -std values

Any comments or suggestions will be very helpful. We also want to add
support for other shells, so any support for this is also very appriciated.

(If this email doesn't make sense to you, please take a look at
http://blog.llvm.org/2017/09/clang-bash-better-auto-completion-is.html)

Thanks,
Yuka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171027/6ed1c2a3/attachment.html>


More information about the llvm-dev mailing list