[Lldb-commits] [PATCH] D54682: [Driver] Extract option parsing and option processing.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 19 05:46:31 PST 2018


labath added a comment.

If by //"it would cause errors to no longer appear in the same order as specified by the user, but in an arbitrary order specified by the driver implementation"//, you mean that now for a command line like:

  $ new/lldb -S /tmp/sadg --file /tmp/qwr

I get

  error: file specified in --file (-f) option doesn't exist: '/tmp/qwr'

instead of

  error: file specified in --source (-s) option doesn't exist: '/tmp/sadg'

then that's something I really don't care about.

I have to agree that the new --help output is less readable than the old one, but that's a price I would be willing to pay for getting rid of getopt. And this can be easily improved in the future, either by rolling our own --help output (as we do now anyway), or by improving the central libOption help printer (thereby improving `clang --help` output as well, which I also find lacking in readability).

So yes, I'm in favour of the libOption approach, or at least cleaning this up by "sacrificing" the error message order.

(I also have to point out that for libOption to work, someone will have to dive into the xcode project to get the tablegen rules in there.)


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D54682





More information about the lldb-commits mailing list