[Lldb-commits] [PATCH] D54692: [Driver] Use libOption with tablegen.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 26 09:32:47 PST 2018


labath added a comment.

In D54692#1308207 <https://reviews.llvm.org/D54692#1308207>, @zturner wrote:

> In D54692#1308190 <https://reviews.llvm.org/D54692#1308190>, @labath wrote:
>
> > Another reason for using libOption is that it is also usable as a parser for the lldb command line, whereas cl::opt is definitely not (it uses global variables). And there's value in consistency between the lldb driver and the built-in command line.
>
>
> This is true too.  Although I believe libOption doesn't support subcommands, which would be required in order to use it for the interactive lldb command line, but again, there would be value in adding that to libOption outside of llvm (cl::opt supports it, so it's required in order to port some remaining llvm tools to libOption)


Adding subcommands is one way. Another would be to simply keep the existing subcommand-parsing code (which we  already have, as getopt doesn't support that either), and just replace the getopt part with libOption.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54692/new/

https://reviews.llvm.org/D54692





More information about the lldb-commits mailing list