JDevlieghere added a comment.

In https://reviews.llvm.org/D54682#1302448, @zturner wrote:

> Lib option definitely does, as its entire purpose is to be powerful and
>  flexible enough to mimic arbitrary command line tools.


I created https://reviews.llvm.org/D54692 to show what the driver would look 
like using libOption. Personally I think the code looks better but the help is 
more messy, especially with the aliases. It's more consistent with LLVM though, 
which has to count for something.

The only thing that I found missing was support for the "end of options" marker 
(`--`). I ended up implementing a simple work-around, but it seems like the lib 
could benefit from supporting that. I'll have a look when I have some spare 
time.

> cl::opt is a little less powerful but it still preserves order among
>  multiple options with the same flag, just not multiple options with
>  different flags.
> 
> I don’t have a strong opinion that this particular change should be gated
>  on that, it’s just nice when we can reuse llvm logic. Sometimes it fixes
>  latent bugs, sometimes it enables new functionality that wasn’t possible
>  before, etc. up to you if you wanna give it a shot

I'm always a strong proponent of reusing llvm logic.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D54682



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to