LLVM 22.0.0git
llvm::cl::parser< DataType > Class Template Reference

#include "llvm/Support/CommandLine.h"

Inheritance diagram for llvm::cl::parser< DataType >:
[legend]

Classes

class  OptionInfo

Public Types

using parser_data_type = DataType

Public Member Functions

 parser (Option &O)
unsigned getNumOptions () const override
StringRef getOption (unsigned N) const override
StringRef getDescription (unsigned N) const override
const GenericOptionValuegetOptionValue (unsigned N) const override
bool parse (Option &O, StringRef ArgName, StringRef Arg, DataType &V)
template<class DT>
void addLiteralOption (StringRef Name, const DT &V, StringRef HelpStr)
 Add an entry to the mapping table.
void removeLiteralOption (StringRef Name)
 Remove the specified option.
Public Member Functions inherited from llvm::cl::generic_parser_base
 generic_parser_base (Option &O)
virtual ~generic_parser_base ()=default
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< StringRef > &OptionNames)
enum ValueExpected getValueExpectedFlagDefault () const
unsigned findOption (StringRef Name)

Protected Attributes

SmallVector< OptionInfo, 8 > Values
Protected Attributes inherited from llvm::cl::generic_parser_base
OptionOwner

Detailed Description

template<class DataType>
class llvm::cl::parser< DataType >

Definition at line 824 of file CommandLine.h.

Member Typedef Documentation

◆ parser_data_type

template<class DataType>
using llvm::cl::parser< DataType >::parser_data_type = DataType

Definition at line 838 of file CommandLine.h.

Constructor & Destructor Documentation

◆ parser()

template<class DataType>
llvm::cl::parser< DataType >::parser ( Option & O)
inline

Member Function Documentation

◆ addLiteralOption()

template<class DataType>
template<class DT>
void llvm::cl::parser< DataType >::addLiteralOption ( StringRef Name,
const DT & V,
StringRef HelpStr )
inline

◆ getDescription()

template<class DataType>
StringRef llvm::cl::parser< DataType >::getDescription ( unsigned N) const
inlineoverridevirtual

Implements llvm::cl::generic_parser_base.

Definition at line 843 of file CommandLine.h.

References N, and Values.

◆ getNumOptions()

template<class DataType>
unsigned llvm::cl::parser< DataType >::getNumOptions ( ) const
inlineoverridevirtual

Implements llvm::cl::generic_parser_base.

Definition at line 841 of file CommandLine.h.

References Values.

◆ getOption()

template<class DataType>
StringRef llvm::cl::parser< DataType >::getOption ( unsigned N) const
inlineoverridevirtual

Implements llvm::cl::generic_parser_base.

Definition at line 842 of file CommandLine.h.

References N, and Values.

◆ getOptionValue()

template<class DataType>
const GenericOptionValue & llvm::cl::parser< DataType >::getOptionValue ( unsigned N) const
inlineoverridevirtual

Implements llvm::cl::generic_parser_base.

Definition at line 848 of file CommandLine.h.

References N, and Values.

◆ parse()

template<class DataType>
bool parser::parse ( Option & O,
StringRef ArgName,
StringRef Arg,
DataType & V )
inline

Definition at line 853 of file CommandLine.h.

References llvm::cl::generic_parser_base::Owner, and Values.

◆ removeLiteralOption()

template<class DataType>
void llvm::cl::parser< DataType >::removeLiteralOption ( StringRef Name)
inline

Remove the specified option.

Definition at line 884 of file CommandLine.h.

References assert(), llvm::cl::generic_parser_base::findOption(), N, and Values.

Member Data Documentation

◆ Values


The documentation for this class was generated from the following files: