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

Daniel Liew daniel.liew at imperial.ac.uk
Tue Apr 9 04:09:16 PDT 2013


I realised my naming of the default option category wasn't such a good
idea (a category called "Default" is confusing) so I've amended my
first patch so that the default category is called "General".

The amended patch (001-amended.patch) is attached. I should also note
that patch 001 needs to be applied before patch 002.

Thanks,
Dan.

On 9 April 2013 01:09, Liew, Daniel <daniel.liew at imperial.ac.uk> wrote:
> Hi,
>
> I have attached two patches
>
> 001.patch
>
> This patch adds support for declaring option categories and assigning
> options to them. In addition it adds categorised help printers
> (-help-cat and -help-cat-hidden). This is based off some of my
> previous work except there are no longer horrible C macros :)
>
> 002.patch
>
> This patch provides a public interface to registered command line
> options so that a client can do things to options that a library that
> the client does not have direct access to
>
> - hide/unhide options
> - Put an option in a different category
> - Rename options (e.g. make -help behave like -help-cat)
>
> I built a small sample project that doesn't do anything useful but it
> demonstrates my changes to LLVM CommandLine Library interface. It can
> be seen at https://github.com/delcypher/sample-llvm-cmd
>
> My patches rebased on the current LLVM head can be seen at
> https://github.com/delcypher/llvm/commits/new-llvm-cmd
>
> I have not yet written sphinx documentation for these additions to the
> LLVM CommandLine library but if the patches are accepted then I will
> do so.
>
> Please review these patches.
>
> Thanks,
> Dan Liew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-amended.patch
Type: application/octet-stream
Size: 12682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130409/c0837d8a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 002.patch
Type: application/octet-stream
Size: 2873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130409/c0837d8a/attachment-0001.obj>


More information about the llvm-commits mailing list