[PATCH] Extra Command Line library functionality (option grouping and runtime inspection/modification)

Matt Arsenault arsenm2 at gmail.com
Thu May 2 11:26:05 PDT 2013


On Apr 22, 2013, at 7:03 , Daniel Liew <daniel.liew at imperial.ac.uk> wrote:

> On 22/04/13 11:02, Daniel Liew wrote:
> 
> I tweaked the implementation and documentation slightly. The new version
> of the patches are attached.

There are 2 parts of this I didn't like. Regular -help still exists, and prints all options. I think it would make more sense for -help to by default print categorized. Alternatively, I think it would make sense for only options that aren't given a category to be printed by -help, and then each category would have a flag (-help-<category name>) instead of having a separate -help-cat which nobody would ever know about / use. I've modified this patch to behave this way in an unrelated project of mine that uses a small forked subset of the parts of the support library I like.

As a minor point, you are missing consts in a bunch of places. (e.g OptionCategory::getName(), cat's Category should be const reference)





More information about the llvm-commits mailing list