[LLVMdev] Modifying the support CommandLine Library to support option categories and iteration over registered options

Daniel Liew daniel.liew at imperial.ac.uk
Thu Apr 11 01:17:38 PDT 2013


Hi Tobias,

The work is complete. I did it and my patch was ignored probably due
to my use of Macros. I then recently re did the work without using
macros and submitted a patch a few days ago.

So far this has been ignored as well :( . If you have commit access
I'd love for you to review the patches and then commit them so my work
will be available in LLVM 3.3 (when it's released) so that we (the
KLEE developers) don't have to force our users to patch LLVM for no
good reason.

Anyway here is the link to the post about my latest patches...

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130408/170920.html

I should note that changed my idea for iterating over command line
options. I didn't think that would be a nice way for people to use it.
Instead with my patch clients can call
llvm::cl::getRegisteredOptions(StringMap<Option*>& map) to get a map
that maps strings (e.g. "help") to the Option* . This gives the client
a lot of control over options. I made an example project that
demonstrates my changes to the LLVM CommandLine library. Here's some
of the code.

https://github.com/delcypher/sample-llvm-cmd/blob/master/tools/sample/main.cpp

Cheers,
Dan.

On 11 April 2013 09:08, Tobias Grosser <tobias at grosser.es> wrote:
> On 02/06/2013 07:16 PM, Daniel Liew wrote:
>> Hi,
>>
>> I'm a contributor to the KLEE project (based on LLVM) and I'm
>> currently looking at trying to add the following functionality to
>> KLEE...
> [...]
>>
>> So what do people think? If there are no major objections I'll try and
>> implement the ideas I described above and submit a patch.
>
> Hi Dan,
>
> I would be very interested in this feature. What is the progress of this?
>
> Cheers,
> Tobias



More information about the llvm-dev mailing list