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

Daniel Liew daniel.liew at imperial.ac.uk
Mon Apr 8 17:09:31 PDT 2013


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.patch
Type: application/octet-stream
Size: 12640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130409/61c920bc/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/61c920bc/attachment-0001.obj>


More information about the llvm-commits mailing list