LLVM  8.0.1
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
llvm::cl::parser< DataType > Class Template Reference

#include "llvm/Support/CommandLine.h"

Inheritance diagram for llvm::cl::parser< DataType >:
Inheritance graph
[legend]
Collaboration diagram for llvm::cl::parser< DataType >:
Collaboration graph
[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)
 addLiteralOption - Add an entry to the mapping table. More...
 
void removeLiteralOption (StringRef 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 ()=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 755 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 769 of file CommandLine.h.

Constructor & Destructor Documentation

◆ parser()

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

Definition at line 767 of file CommandLine.h.

Member Function Documentation

◆ addLiteralOption()

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

addLiteralOption - Add an entry to the mapping table.

Definition at line 803 of file CommandLine.h.

◆ getDescription()

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

Implements llvm::cl::generic_parser_base.

Definition at line 774 of file CommandLine.h.

◆ getNumOptions()

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

Implements llvm::cl::generic_parser_base.

Definition at line 772 of file CommandLine.h.

◆ getOption()

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

Implements llvm::cl::generic_parser_base.

Definition at line 773 of file CommandLine.h.

◆ getOptionValue()

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

Implements llvm::cl::generic_parser_base.

Definition at line 779 of file CommandLine.h.

◆ parse()

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

Definition at line 784 of file CommandLine.h.

Referenced by parseDouble(), and llvm::cl::basic_parser_impl::printOptionName().

◆ removeLiteralOption()

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

removeLiteralOption - Remove the specified option.

Definition at line 812 of file CommandLine.h.

Member Data Documentation

◆ Values

template<class DataType>
SmallVector<OptionInfo, 8> llvm::cl::parser< DataType >::Values
protected

Definition at line 764 of file CommandLine.h.

Referenced by llvm::PassNameParser::printOptionInfo().


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