|
LLVM
3.7.0
|
A command-line parser for a registry. More...
#include <RegistryParser.h>
Public Member Functions | |
| void | initialize (cl::Option &O) |
Public Member Functions inherited from llvm::cl::parser< const U::entry * > | |
| parser (Option &O) | |
| unsigned | getNumOptions () const override |
| const char * | getOption (unsigned N) const override |
| const char * | getDescription (unsigned N) const override |
| const GenericOptionValue & | getOptionValue (unsigned N) const override |
| bool | parse (Option &O, StringRef ArgName, StringRef Arg, const U::entry *&V) |
| void | addLiteralOption (const char *Name, const DT &V, const char *HelpStr) |
| addLiteralOption - Add an entry to the mapping table. More... | |
| void | removeLiteralOption (const char *Name) |
| removeLiteralOption - Remove the specified option. More... | |
Public Member Functions inherited from llvm::cl::generic_parser_base | |
| generic_parser_base (Option &O) | |
| virtual | ~generic_parser_base () |
| virtual size_t | getOptionWidth (const Option &O) const |
| virtual void | printOptionInfo (const Option &O, size_t GlobalWidth) const |
| void | printGenericOptionDiff (const Option &O, const GenericOptionValue &V, const GenericOptionValue &Default, size_t GlobalWidth) const |
| template<class AnyOptionValue > | |
| void | printOptionDiff (const Option &O, const AnyOptionValue &V, const AnyOptionValue &Default, size_t GlobalWidth) const |
| void | initialize () |
| void | getExtraOptionNames (SmallVectorImpl< const char * > &OptionNames) |
| enum ValueExpected | getValueExpectedFlagDefault () const |
| unsigned | findOption (const char *Name) |
Public Member Functions inherited from llvm::Registry< T, U >::listener | |
| listener () | |
| virtual | ~listener () |
Protected Member Functions | |
| void | registered (const entry &E) |
| Called when an entry is added to the registry. More... | |
Protected Member Functions inherited from llvm::Registry< T, U >::listener | |
| void | init () |
| Calls 'registered' for each pre-existing entry. More... | |
Additional Inherited Members | |
Public Types inherited from llvm::cl::parser< const U::entry * > | |
| typedef const U::entry * | parser_data_type |
Protected Attributes inherited from llvm::cl::parser< const U::entry * > | |
| SmallVector< OptionInfo, 8 > | Values |
Protected Attributes inherited from llvm::cl::generic_parser_base | |
| Option & | Owner |
A command-line parser for a registry.
Use like such:
static cl::opt<Registry<Collector>::entry, false, RegistryParser<Collector> > GCOpt("gc", cl::desc("Garbage collector to use."), cl::value_desc());
To make use of the value:
Collector *TheCollector = GCOpt->instantiate();
Definition at line 34 of file RegistryParser.h.
|
inline |
Definition at line 47 of file RegistryParser.h.
References llvm::Registry< T, U >::listener::init(), and llvm::cl::generic_parser_base::initialize().
|
inlineprotectedvirtual |
Called when an entry is added to the registry.
Implements llvm::Registry< T, U >::listener.
Definition at line 42 of file RegistryParser.h.
References llvm::cl::parser< const U::entry * >::addLiteralOption().
1.8.6