[LLVMdev] Patch: Prefix for ParseCommandLineOptions()

Evan Cheng echeng at apple.com
Tue Mar 3 23:04:55 PST 2009


I don't have any opinions about this. Chris?

Evan
On Feb 17, 2009, at 8:00 PM, Alexei Svitkine wrote:

> The motivation behind this patch is that tools that use LLVM as a
> library and want to use its command line parsing facilities may not
> want all the various options defined in the LLVM libraries to be
> available - simply because they may not be relevant.
>
> This patch adds an optional "Prefix" parameter to
> ParseCommandLineOptions(). If set, this will make inaccessible any
> options that do not begin with the prefix string. Any options with the
> prefix string will act as if they were defined without that string.
>
> For example, if prefix string is "foo-", and "foo-bar" is a defined
> option, it will be displayed under --help as "--bar" and can be used
> as "--bar". Any options without "foo-" prefix will not be displayed
> under --help and will not be useable from the command line.
>
> -Alexei
> <
> CommandLinePrefix.diff>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list