LLVM API Documentation
#include <RegistryParser.h>
Public Member Functions | |
void | initialize (cl::Option &O) |
![]() | |
unsigned | getNumOptions () const |
const char * | getOption (unsigned N) const |
const char * | getDescription (unsigned N) const |
virtual const GenericOptionValue & | getOptionValue (unsigned N) const |
bool | parse (Option &O, StringRef ArgName, StringRef Arg, const U::entry *&V) |
void | addLiteralOption (const char *Name, const DT &V, const char *HelpStr) |
void | removeLiteralOption (const char *Name) |
![]() | |
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 (Option &O) |
void | getExtraOptionNames (SmallVectorImpl< const char * > &OptionNames) |
enum ValueExpected | getValueExpectedFlagDefault () const |
unsigned | findOption (const char *Name) |
![]() | |
listener () | |
virtual | ~listener () |
Protected Member Functions | |
void | registered (const entry &E) |
![]() | |
void | init () |
Additional Inherited Members | |
![]() | |
typedef const U::entry * | parser_data_type |
![]() | |
SmallVector< OptionInfo, 8 > | Values |
![]() | |
bool | hasArgStr |
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().