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

Dan Liew daniel.liew at imperial.ac.uk
Sat May 4 04:47:14 PDT 2013


See my responses below.
On 03/05/13 22:39, Andrew Trick wrote:
> Daniel,
> 
> I reviewed your most recent patch (MOREFIXES) and your
> getRegisteredOptions patch. They both look very nice.
> 
> I have one suggestion. For normal (non-hidden) help, we may have empty
> categories, which looks odd. Can you just suppress printing the category
> in that case?

Yes I can do that. Would you like empty category printing to be
suppressed for -help-hidden as well or should we show it?

> Also, would you mind adding a couple simple tests to CommandLineTest.cpp?

I have not used LLVM's testing infrastructure very much so I'm going to
need some guidance here.

I looked at the LLVM testing infrastructure documentation and it
mentioned the regression tests (obviously not what I want) and
test-suite (sounded promising as documentation said it built whole
programs). I took a look at the test-suite but it didn't look
appropriate as I could not see a way an obvious way to link to the
LLVMSupport library.

I also took a look at the unittests in the LLVM repository and found
some existing in "unittests/Support/CommandLineTest.cpp".

Is it here that you would like me to add tests?

If so do you have any suggestions on testing the OptionCategory class? I
can test whether or not an option has a category set but there isn't a
way (AFAIK) to test the output of --help (which is the whole point of
the feature) against some known output in the gtest framework.

> Otherwise, it's ready to commit. Will you need me to check it in?
Y
Yes I will need you to check it in as I do not have commit access.

Thanks,
Dan.



More information about the llvm-commits mailing list