LLVM API Documentation

llvm::cl Namespace Reference


Classes

class  Option
struct  desc
struct  value_desc
struct  initializer
struct  LocationClass
class  ValuesClass
struct  generic_parser_base
class  parser
struct  basic_parser_impl
struct  basic_parser
class  parser< bool >
class  parser< boolOrDefault >
class  parser< int >
class  parser< unsigned >
class  parser< double >
class  parser< float >
class  parser< std::string >
struct  applicator
struct  applicator< char[n]>
struct  applicator< const char[n]>
struct  applicator< const char * >
struct  applicator< NumOccurrences >
struct  applicator< ValueExpected >
struct  applicator< OptionHidden >
struct  applicator< FormattingFlags >
struct  applicator< MiscFlags >
class  opt_storage
class  opt_storage< DataType, false, true >
class  opt_storage< DataType, false, false >
class  opt
class  list_storage
class  list_storage< DataType, bool >
class  list
struct  multi_val
class  bits_storage
class  bits_storage< DataType, bool >
class  bits
class  alias
struct  aliasopt
struct  extrahelp

Enumerations

enum  NumOccurrences {
  Optional = 0x01, ZeroOrMore = 0x02, Required = 0x03, OneOrMore = 0x04,
  ConsumeAfter = 0x05, OccurrencesMask = 0x07
}
enum  ValueExpected { ValueOptional = 0x08, ValueRequired = 0x10, ValueDisallowed = 0x18, ValueMask = 0x18 }
enum  OptionHidden { NotHidden = 0x20, Hidden = 0x40, ReallyHidden = 0x60, HiddenMask = 0x60 }
enum  FormattingFlags {
  NormalFormatting = 0x000, Positional = 0x080, Prefix = 0x100, Grouping = 0x180,
  FormattingMask = 0x180
}
enum  MiscFlags {
  CommaSeparated = 0x200, PositionalEatsArgs = 0x400, Sink = 0x800, AllowInverse = 0x1000,
  MiscMask = 0x1E00
}
enum  boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE }

Functions

void ParseCommandLineOptions (int argc, char **argv, const char *Overview=0, bool ReadResponseFiles=false)
void ParseEnvironmentOptions (const char *progName, const char *envvar, const char *Overview=0, bool ReadResponseFiles=false)
void SetVersionPrinter (void(*func)())
void MarkOptionsChanged ()
template<class Ty>
initializer< Ty > init (const Ty &Val)
template<class Ty>
LocationClass< Ty > location (Ty &L)
template<class DataType>
ValuesClass< DataType >
END_WITH_NULL 
values (const char *Arg, DataType Val, const char *Desc,...)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< bool >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< boolOrDefault >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< int >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< unsigned >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< double >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< float >)
 EXTERN_TEMPLATE_INSTANTIATION (class basic_parser< std::string >)
template<class Mod, class Opt>
void apply (const Mod &M, Opt *O)
 EXTERN_TEMPLATE_INSTANTIATION (class opt< unsigned >)
 EXTERN_TEMPLATE_INSTANTIATION (class opt< int >)
 EXTERN_TEMPLATE_INSTANTIATION (class opt< std::string >)
 EXTERN_TEMPLATE_INSTANTIATION (class opt< bool >)
void PrintVersionMessage ()
 Utility function for printing version number.
void PrintHelpMessage ()


Detailed Description

cl Namespace - This namespace contains all of the command line option processing machinery. It is intentionally a short name to make qualified usage concise.

Enumeration Type Documentation

Enumerator:
BOU_UNSET 
BOU_TRUE 
BOU_FALSE 

Definition at line 582 of file CommandLine.h.

Enumerator:
NormalFormatting 
Positional 
Prefix 
Grouping 
FormattingMask 

Definition at line 117 of file CommandLine.h.

Enumerator:
CommaSeparated 
PositionalEatsArgs 
Sink 
AllowInverse 
MiscMask 

Definition at line 125 of file CommandLine.h.

Enumerator:
Optional 
ZeroOrMore 
Required 
OneOrMore 
ConsumeAfter 
OccurrencesMask 

Definition at line 70 of file CommandLine.h.

Enumerator:
NotHidden 
Hidden 
ReallyHidden 
HiddenMask 

Definition at line 95 of file CommandLine.h.

Enumerator:
ValueOptional 
ValueRequired 
ValueDisallowed 
ValueMask 

Definition at line 88 of file CommandLine.h.


Function Documentation

template<class Mod, class Opt>
void llvm::cl::apply ( const Mod &  M,
Opt *  O 
) [inline]

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class opt< bool >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class opt< std::string >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class opt< int >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class opt< unsigned >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< std::string >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< float >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< double >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< unsigned >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< int >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< boolOrDefault >   ) 

llvm::cl::EXTERN_TEMPLATE_INSTANTIATION ( class basic_parser< bool >   ) 

template<class Ty>
initializer<Ty> llvm::cl::init ( const Ty &  Val  )  [inline]

Definition at line 285 of file CommandLine.h.

Referenced by llvm::RegistryParser< T, U >::initialize().

template<class Ty>
LocationClass<Ty> llvm::cl::location ( Ty &  L  )  [inline]

Definition at line 304 of file CommandLine.h.

void llvm::cl::MarkOptionsChanged (  ) 

void llvm::cl::ParseCommandLineOptions ( int  argc,
char **  argv,
const char *  Overview = 0,
bool  ReadResponseFiles = false 
)

void llvm::cl::ParseEnvironmentOptions ( const char *  progName,
const char *  envVar,
const char *  Overview = 0,
bool  ReadResponseFiles = false 
)

ParseEnvironmentOptions - An alternative entry point to the CommandLine library, which allows you to read the program's name from the caller (as PROGNAME) and its command-line arguments from an environment variable (whose name is given in ENVVAR).

Definition at line 347 of file CommandLine.cpp.

References ParseCommandLineOptions(), and ParseCStringVector().

void llvm::cl::PrintHelpMessage (  ) 

Definition at line 1166 of file CommandLine.cpp.

References NormalPrinter().

void llvm::cl::PrintVersionMessage (  ) 

Utility function for printing version number.

Definition at line 1177 of file CommandLine.cpp.

void llvm::cl::SetVersionPrinter ( void(*)()  func  ) 

===---------------------------------------------------------------------===// SetVersionPrinter - Override the default (LLVM specific) version printer used to print out the version when --version is given on the command line. This allows other systems using the CommandLine utilities to print their own version string.

Definition at line 1181 of file CommandLine.cpp.

References OverrideVersionPrinter.

template<class DataType>
ValuesClass<DataType> END_WITH_NULL llvm::cl::values ( const char *  Arg,
DataType  Val,
const char *  Desc,
  ... 
) [inline]

Definition at line 351 of file CommandLine.h.

References Vals.