LLVM  14.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
llvm::cl Namespace Reference

cl Namespace - This namespace contains all of the command line option processing machinery. More...

Namespaces

 detail
 

Classes

class  alias
 
struct  aliasopt
 
struct  applicator
 
struct  applicator< char[n]>
 
struct  applicator< const char[n]>
 
struct  applicator< FormattingFlags >
 
struct  applicator< MiscFlags >
 
struct  applicator< NumOccurrencesFlag >
 
struct  applicator< OptionHidden >
 
struct  applicator< StringRef >
 
struct  applicator< ValueExpected >
 
class  basic_parser
 
class  basic_parser_impl
 
class  bits
 
class  bits_storage
 
class  bits_storage< DataType, bool >
 
struct  cat
 
struct  cb
 
struct  desc
 
struct  extrahelp
 
class  generic_parser_base
 
struct  GenericOptionValue
 
struct  initializer
 
class  list
 
class  list_storage
 
class  list_storage< DataType, bool >
 
struct  LocationClass
 
struct  multi_val
 
class  opt
 
class  opt_storage
 
class  opt_storage< DataType, false, false >
 
class  opt_storage< DataType, false, true >
 
class  Option
 
class  OptionCategory
 
struct  OptionDiffPrinter
 
struct  OptionDiffPrinter< DT, DT >
 
struct  OptionEnumValue
 
struct  OptionValue
 
struct  OptionValue< cl::boolOrDefault >
 
struct  OptionValue< std::string >
 
struct  OptionValueBase
 
struct  OptionValueBase< DataType, false >
 
class  OptionValueCopy
 
class  parser
 
class  parser< bool >
 
class  parser< boolOrDefault >
 
class  parser< char >
 
class  parser< double >
 
class  parser< float >
 
class  parser< int >
 
class  parser< long >
 
class  parser< long long >
 
class  parser< std::string >
 
class  parser< unsigned >
 
class  parser< unsigned long >
 
class  parser< unsigned long long >
 
struct  sub
 
class  SubCommand
 
struct  value_desc
 
class  ValuesClass
 

Typedefs

using VersionPrinterTy = std::function< void(raw_ostream &)>
 
using TokenizerCallback = void(*)(StringRef Source, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv, bool MarkEOLs)
 String tokenization function type. More...
 

Enumerations

enum  NumOccurrencesFlag {
  Optional = 0x00, ZeroOrMore = 0x01, Required = 0x02, OneOrMore = 0x03,
  ConsumeAfter = 0x04
}
 
enum  ValueExpected { ValueOptional = 0x01, ValueRequired = 0x02, ValueDisallowed = 0x03 }
 
enum  OptionHidden { NotHidden = 0x00, Hidden = 0x01, ReallyHidden = 0x02 }
 
enum  FormattingFlags { NormalFormatting = 0x00, Positional = 0x01, Prefix = 0x02, AlwaysPrefix = 0x03 }
 
enum  MiscFlags {
  CommaSeparated = 0x01, PositionalEatsArgs = 0x02, Sink = 0x04, Grouping = 0x08,
  DefaultOption = 0x10
}
 
enum  boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE }
 

Functions

bool ParseCommandLineOptions (int argc, const char *const *argv, StringRef Overview="", raw_ostream *Errs=nullptr, const char *EnvVar=nullptr, bool LongOptionsUseDoubleDash=false)
 
void SetVersionPrinter (VersionPrinterTy func)
 ===------------------------------------------------------------------—===// SetVersionPrinter - Override the default (LLVM specific) version printer used to print out the version when –version is given on the command line. More...
 
void AddExtraVersionPrinter (VersionPrinterTy func)
 ===------------------------------------------------------------------—===// AddExtraVersionPrinter - Add an extra printer to use in addition to the default one. More...
 
void PrintOptionValues ()
 
void AddLiteralOption (Option &O, StringRef Name)
 Adds a new option for parsing and provides the option it refers to. More...
 
OptionCategorygetGeneralCategory ()
 
template<class Ty >
initializer< Ty > init (const Ty &Val)
 
template<class Ty >
LocationClass< Ty > location (Ty &L)
 
template<typename F >
cb< typename detail::callback_traits< F >::result_type, typename detail::callback_traits< F >::arg_type > callback (F CB)
 
template<typename... OptsTy>
ValuesClass values (OptsTy... Options)
 Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to the ValuesClass constructor. More...
 
template<class ParserClass , class DT >
void printOptionDiff (const Option &O, const generic_parser_base &P, const DT &V, const OptionValue< DT > &Default, size_t GlobalWidth)
 
template<class ParserClass , class ValDT >
void printOptionDiff (const Option &O, const basic_parser< typename ParserClass::parser_data_type > &P, const ValDT &V, const OptionValue< ValDT > &Default, size_t GlobalWidth)
 
template<class Opt , class Mod , class... Mods>
void apply (Opt *O, const Mod &M, const Mods &... Ms)
 
template<class Opt , class Mod >
void apply (Opt *O, const Mod &M)
 
void PrintVersionMessage ()
 Utility function for printing version number. More...
 
void PrintHelpMessage (bool Hidden=false, bool Categorized=false)
 This function just prints the help message, exactly the same way as if the -help or -help-hidden option had been given on the command line. More...
 
StringMap< Option * > & getRegisteredOptions (SubCommand &Sub= *TopLevelSubCommand)
 Use this to get a StringMap to all registered named options (e.g. More...
 
iterator_range< typename SmallPtrSet< SubCommand *, 4 >::iterator > getRegisteredSubcommands ()
 Use this to get all registered SubCommands from the provided parser. More...
 
void TokenizeGNUCommandLine (StringRef Source, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv, bool MarkEOLs=false)
 Tokenizes a command line that can contain escapes and quotes. More...
 
void TokenizeWindowsCommandLine (StringRef Source, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv, bool MarkEOLs=false)
 Tokenizes a Windows command line which may contain quotes and escaped quotes. More...
 
void TokenizeWindowsCommandLineNoCopy (StringRef Source, StringSaver &Saver, SmallVectorImpl< StringRef > &NewArgv)
 Tokenizes a Windows command line while attempting to avoid copies. More...
 
void tokenizeConfigFile (StringRef Source, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv, bool MarkEOLs=false)
 Tokenizes content of configuration file. More...
 
bool readConfigFile (StringRef CfgFileName, StringSaver &Saver, SmallVectorImpl< const char * > &Argv)
 Reads command line options from the given configuration file. More...
 
bool ExpandResponseFiles (StringSaver &Saver, TokenizerCallback Tokenizer, SmallVectorImpl< const char * > &Argv, bool MarkEOLs, bool RelativeNames, llvm::Optional< llvm::StringRef > CurrentDir, llvm::vfs::FileSystem &FS)
 Expand response files on a command line recursively using the given StringSaver and tokenization strategy. More...
 
bool ExpandResponseFiles (StringSaver &Saver, TokenizerCallback Tokenizer, SmallVectorImpl< const char * > &Argv, bool MarkEOLs=false, bool RelativeNames=false, llvm::Optional< llvm::StringRef > CurrentDir=llvm::None)
 An overload of ExpandResponseFiles() that uses llvm::vfs::getRealFileSystem(). More...
 
bool expandResponseFiles (int Argc, const char *const *Argv, const char *EnvVar, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv)
 A convenience helper which concatenates the options specified by the environment variable EnvVar and command line options, then expands response files recursively. More...
 
void HideUnrelatedOptions (cl::OptionCategory &Category, SubCommand &Sub= *TopLevelSubCommand)
 Mark all options not part of this category as cl::ReallyHidden. More...
 
void HideUnrelatedOptions (ArrayRef< const cl::OptionCategory * > Categories, SubCommand &Sub= *TopLevelSubCommand)
 Mark all options not part of the categories as cl::ReallyHidden. More...
 
void ResetAllOptionOccurrences ()
 Reset all command line options to a state that looks as if they have never appeared on the command line. More...
 
void ResetCommandLineParser ()
 Reset the command line parser back to its initial state. More...
 
bool ProvidePositionalOption (Option *Handler, StringRef Arg, int i)
 Parses Arg into the option handler Handler. More...
 

Variables

ManagedStatic< SubCommandTopLevelSubCommand
 
ManagedStatic< SubCommandAllSubCommands
 

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.

Typedef Documentation

◆ TokenizerCallback

using llvm::cl::TokenizerCallback = typedef void (*)(StringRef Source, StringSaver &Saver, SmallVectorImpl<const char *> &NewArgv, bool MarkEOLs)

String tokenization function type.

Should be compatible with either Windows or Unix command line tokenizers.

Definition at line 2059 of file CommandLine.h.

◆ VersionPrinterTy

Definition at line 78 of file CommandLine.h.

Enumeration Type Documentation

◆ boolOrDefault

Enumerator
BOU_UNSET 
BOU_TRUE 
BOU_FALSE 

Definition at line 623 of file CommandLine.h.

◆ FormattingFlags

Enumerator
NormalFormatting 
Positional 
Prefix 
AlwaysPrefix 

Definition at line 161 of file CommandLine.h.

◆ MiscFlags

Enumerator
CommaSeparated 
PositionalEatsArgs 
Sink 
Grouping 
DefaultOption 

Definition at line 168 of file CommandLine.h.

◆ NumOccurrencesFlag

Enumerator
Optional 
ZeroOrMore 
Required 
OneOrMore 
ConsumeAfter 

Definition at line 118 of file CommandLine.h.

◆ OptionHidden

Enumerator
NotHidden 
Hidden 
ReallyHidden 

Definition at line 141 of file CommandLine.h.

◆ ValueExpected

Enumerator
ValueOptional 
ValueRequired 
ValueDisallowed 

Definition at line 134 of file CommandLine.h.

Function Documentation

◆ AddExtraVersionPrinter()

void llvm::cl::AddExtraVersionPrinter ( VersionPrinterTy  func)

===------------------------------------------------------------------—===// AddExtraVersionPrinter - Add an extra printer to use in addition to the default one.

This can be called multiple times, and each time it adds a new function to the list which will be called after the basic LLVM version printing is complete. Each can then add additional information specific to the tool.

Definition at line 2639 of file CommandLine.cpp.

References CommonOptions.

◆ AddLiteralOption()

void llvm::cl::AddLiteralOption ( Option O,
StringRef  Name 
)

Adds a new option for parsing and provides the option it refers to.

Parameters
Opointer to the option
Namethe string name for the option to handle during parsing

Literal options are used by some parsers to register special option values. This is how the PassNameParser registers pass names for opt.

Definition at line 439 of file CommandLine.cpp.

References GlobalParser, and llvm::RISCVFenceField::O.

Referenced by llvm::cl::parser< const PassInfo * >::addLiteralOption().

◆ apply() [1/2]

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

Definition at line 1323 of file CommandLine.h.

References M, llvm::RISCVFenceField::O, and llvm::cl::applicator< Mod >::opt().

◆ apply() [2/2]

template<class Opt , class Mod , class... Mods>
void llvm::cl::apply ( Opt *  O,
const Mod &  M,
const Mods &...  Ms 
)

◆ callback()

template<typename F >
cb<typename detail::callback_traits<F>::result_type, typename detail::callback_traits<F>::arg_type> llvm::cl::callback ( F  CB)

◆ expandResponseFiles()

bool llvm::cl::expandResponseFiles ( int  Argc,
const char *const Argv,
const char *  EnvVar,
StringSaver Saver,
SmallVectorImpl< const char * > &  NewArgv 
)

A convenience helper which concatenates the options specified by the environment variable EnvVar and command line options, then expands response files recursively.

The tokenizer is a predefined GNU or Windows one.

Returns
true if all @files were expanded successfully or there were none.

Definition at line 1260 of file CommandLine.cpp.

References llvm::SmallVectorImpl< T >::append(), ExpandResponseFiles(), llvm::sys::Process::GetEnv(), llvm::sys::getProcessTriple(), llvm::Triple::isOSWindows(), TokenizeGNUCommandLine(), and TokenizeWindowsCommandLine().

Referenced by llvm::opt::OptTable::parseArgs().

◆ ExpandResponseFiles() [1/2]

bool llvm::cl::ExpandResponseFiles ( StringSaver Saver,
TokenizerCallback  Tokenizer,
SmallVectorImpl< const char * > &  Argv,
bool  MarkEOLs,
bool  RelativeNames,
llvm::Optional< llvm::StringRef CurrentDir,
llvm::vfs::FileSystem FS 
)

Expand response files on a command line recursively using the given StringSaver and tokenization strategy.

Argv should contain the command line before expansion and will be modified in place. If requested, Argv will also be populated with nullptrs indicating where each response file line ends, which is useful for the "/link" argument that needs to consume all remaining arguments only until the next end of line, when in a response file.

Parameters
[in]SaverDelegates back to the caller for saving parsed strings.
[in]TokenizerTokenization strategy. Typically Unix or Windows.
[in,out]ArgvCommand line into which to expand response files.
[in]MarkEOLsMark end of lines and the end of the response file with nullptrs in the Argv vector.
[in]RelativeNamestrue if names of nested response files must be resolved relative to including file.
[in]FSFile system used for all file access when running the tool.
[in]CurrentDirPath used to resolve relative rsp files. If set to None, process' cwd is used instead.
Returns
true if all @files were expanded successfully or there were none.

Definition at line 1139 of file CommandLine.cpp.

References File.

Referenced by ExpandResponseFiles(), and expandResponseFiles().

◆ ExpandResponseFiles() [2/2]

bool llvm::cl::ExpandResponseFiles ( StringSaver Saver,
TokenizerCallback  Tokenizer,
SmallVectorImpl< const char * > &  Argv,
bool  MarkEOLs = false,
bool  RelativeNames = false,
llvm::Optional< llvm::StringRef CurrentDir = llvm::None 
)

◆ getGeneralCategory()

OptionCategory & llvm::cl::getGeneralCategory ( )

Definition at line 2555 of file CommandLine.cpp.

Referenced by llvm::cl::Option::addCategory(), and llvm::cl::Option::Option().

◆ getRegisteredOptions()

StringMap< Option * > & llvm::cl::getRegisteredOptions ( SubCommand Sub = *TopLevelSubCommand)

Use this to get a StringMap to all registered named options (e.g.

-help).

Returns
A reference to the StringMap used by the cl APIs to parse options.

Access to unnamed arguments (i.e. positional) are not provided because it is expected that the client already has access to these.

Typical usage:

main(int argc,char* argv[]) {
StringMap<llvm::cl::Option*> &opts = llvm::cl::getRegisteredOptions();
assert(opts.count("help") == 1)
opts["help"]->setDescription("Show alphabetical help information")
// More code
//More code
}

This interface is useful for modifying options in libraries that are out of the control of the client. The options should be modified before calling llvm::cl::ParseCommandLineOptions().

Hopefully this API can be deprecated soon. Any situation where options need to be modified by tools or libraries should be handled by sane APIs rather than just handing around a global list.

Definition at line 2643 of file CommandLine.cpp.

References assert(), GlobalParser, initCommonOptions(), llvm::is_contained(), and llvm::cl::SubCommand::OptionsMap.

◆ getRegisteredSubcommands()

iterator_range< typename SmallPtrSet< SubCommand *, 4 >::iterator > llvm::cl::getRegisteredSubcommands ( )

Use this to get all registered SubCommands from the provided parser.

Returns
A range of all SubCommand pointers registered with the parser.

Typical usage:

main(int argc, char* argv[]) {
if (*S) {
std::cout << "Executing subcommand: " << S->getName() << std::endl;
// Execute some function based on the name...
}
}
}

This interface is useful for defining subcommands in libraries and the dispatch from a single point (like in the main function).

Definition at line 2652 of file CommandLine.cpp.

References GlobalParser.

◆ HideUnrelatedOptions() [1/2]

void llvm::cl::HideUnrelatedOptions ( ArrayRef< const cl::OptionCategory * >  Categories,
SubCommand Sub = *TopLevelSubCommand 
)

Mark all options not part of the categories as cl::ReallyHidden.

Parameters
Categoriesthe categories of options to keep displaying.

Some tools (like clang-format) like to be able to hide all options that are not specific to the tool. This function allows a tool to specify a single option category to display in the -help output.

Definition at line 2669 of file CommandLine.cpp.

References CommonOptions, I, initCommonOptions(), llvm::is_contained(), llvm::cl::SubCommand::OptionsMap, and ReallyHidden.

◆ HideUnrelatedOptions() [2/2]

void llvm::cl::HideUnrelatedOptions ( cl::OptionCategory Category,
SubCommand Sub = *TopLevelSubCommand 
)

Mark all options not part of this category as cl::ReallyHidden.

Parameters
Categorythe category of options to keep displaying

Some tools (like clang-format) like to be able to hide all options that are not specific to the tool. This function allows a tool to specify a single option category to display in the -help output.

Definition at line 2656 of file CommandLine.cpp.

References CommonOptions, I, initCommonOptions(), llvm::cl::SubCommand::OptionsMap, and ReallyHidden.

◆ init()

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

◆ location()

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

Definition at line 457 of file CommandLine.h.

Referenced by llvm::initDebugCounterOptions(), and llvm::initStatisticOptions().

◆ ParseCommandLineOptions()

bool llvm::cl::ParseCommandLineOptions ( int  argc,
const char *const argv,
StringRef  Overview = "",
raw_ostream Errs = nullptr,
const char *  EnvVar = nullptr,
bool  LongOptionsUseDoubleDash = false 
)

◆ PrintHelpMessage()

void llvm::cl::PrintHelpMessage ( bool  Hidden = false,
bool  Categorized = false 
)

This function just prints the help message, exactly the same way as if the -help or -help-hidden option had been given on the command line.

Parameters
Hiddenif true will print hidden options
Categorizedif true print options in categories

Definition at line 2619 of file CommandLine.cpp.

References CommonOptions, and Hidden.

◆ printOptionDiff() [1/2]

template<class ParserClass , class ValDT >
void llvm::cl::printOptionDiff ( const Option O,
const basic_parser< typename ParserClass::parser_data_type > &  P,
const ValDT &  V,
const OptionValue< ValDT > &  Default,
size_t  GlobalWidth 
)

◆ printOptionDiff() [2/2]

template<class ParserClass , class DT >
void llvm::cl::printOptionDiff ( const Option O,
const generic_parser_base P,
const DT &  V,
const OptionValue< DT > &  Default,
size_t  GlobalWidth 
)

Definition at line 1226 of file CommandLine.h.

References llvm::RISCVFenceField::O, and P.

◆ PrintOptionValues()

void llvm::cl::PrintOptionValues ( )

Definition at line 2600 of file CommandLine.cpp.

References GlobalParser.

◆ PrintVersionMessage()

void llvm::cl::PrintVersionMessage ( )

Utility function for printing version number.

Definition at line 2631 of file CommandLine.cpp.

References CommonOptions.

◆ ProvidePositionalOption()

bool llvm::cl::ProvidePositionalOption ( Option Handler,
StringRef  Arg,
int  i 
)

Parses Arg into the option handler Handler.

Definition at line 709 of file CommandLine.cpp.

References Arg, llvm::cl::Option::ArgStr, llvm::NVPTXISD::Dummy, i, and ProvideOption().

◆ readConfigFile()

bool llvm::cl::readConfigFile ( StringRef  CfgFileName,
StringSaver Saver,
SmallVectorImpl< const char * > &  Argv 
)

Reads command line options from the given configuration file.

Parameters
[in]CfgFileNamePath to configuration file.
[in]SaverObjects that saves allocated strings.
[out]ArgvArray to which the read options are added.
Returns
true if the file was successfully read.

It reads content of the specified file, tokenizes it and expands "@file" commands resolving file names in them relative to the directory where CfgFilename resides.

Definition at line 1276 of file CommandLine.cpp.

References llvm::sys::path::append(), llvm::sys::fs::current_path(), llvm::sys::path::is_relative(), and llvm::SmallString< InternalLen >::str().

◆ ResetAllOptionOccurrences()

void llvm::cl::ResetAllOptionOccurrences ( )

Reset all command line options to a state that looks as if they have never appeared on the command line.

Reset all options at least once, so that we can parse different options.

This is useful for being able to parse a command line multiple times (especially useful for writing tests).

Definition at line 1325 of file CommandLine.cpp.

References llvm::RISCVFenceField::O, and llvm::PPCISD::SC.

◆ ResetCommandLineParser()

void llvm::cl::ResetCommandLineParser ( )

Reset the command line parser back to its initial state.

This removes all options, categories, and subcommands and returns the parser to a state where no options are supported.

Definition at line 2684 of file CommandLine.cpp.

References GlobalParser.

◆ SetVersionPrinter()

void llvm::cl::SetVersionPrinter ( VersionPrinterTy  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 2635 of file CommandLine.cpp.

References CommonOptions.

◆ tokenizeConfigFile()

void llvm::cl::tokenizeConfigFile ( StringRef  Source,
StringSaver Saver,
SmallVectorImpl< const char * > &  NewArgv,
bool  MarkEOLs = false 
)

Tokenizes content of configuration file.

Parameters
[in]SourceThe string representing content of config file.
[in]SaverDelegates back to the caller for saving parsed strings.
[out]NewArgvAll parsed strings are appended to NewArgv.
[in]MarkEOLsAdded for compatibility with TokenizerCallback.

It works like TokenizeGNUCommandLine with ability to skip comment lines.

Definition at line 1036 of file CommandLine.cpp.

References isWhitespace(), and llvm::Sched::Source.

◆ TokenizeGNUCommandLine()

void llvm::cl::TokenizeGNUCommandLine ( StringRef  Source,
StringSaver Saver,
SmallVectorImpl< const char * > &  NewArgv,
bool  MarkEOLs = false 
)

Tokenizes a command line that can contain escapes and quotes.

The quoting rules match those used by GCC and other tools that use libiberty's buildargv() or expandargv() utilities, and do not match bash. They differ from buildargv() on treatment of backslashes that do not escape a special character to make it possible to accept most Windows file paths.

Parameters
[in]SourceThe string to be split on whitespace with quotes.
[in]SaverDelegates back to the caller for saving parsed strings.
[in]MarkEOLstrue if tokenizing a response file and you want end of lines and end of the response file to be marked with a nullptr string.
[out]NewArgvAll parsed strings are appended to NewArgv.

Definition at line 823 of file CommandLine.cpp.

References llvm::SmallVectorImpl< T >::clear(), llvm::StringRef::data(), E, I, isQuote(), isWhitespace(), llvm::StringSaver::save(), and llvm::SmallString< InternalLen >::str().

Referenced by expandResponseFiles(), and ParseCommandLineOptions().

◆ TokenizeWindowsCommandLine()

void llvm::cl::TokenizeWindowsCommandLine ( StringRef  Source,
StringSaver Saver,
SmallVectorImpl< const char * > &  NewArgv,
bool  MarkEOLs = false 
)

Tokenizes a Windows command line which may contain quotes and escaped quotes.

See MSDN docs for CommandLineToArgvW for information on the quoting rules. http://msdn.microsoft.com/en-us/library/windows/desktop/17w5ykft(v=vs.85).aspx

Parameters
[in]SourceThe string to be split on whitespace with quotes.
[in]SaverDelegates back to the caller for saving parsed strings.
[in]MarkEOLstrue if tokenizing a response file and you want end of lines and end of the response file to be marked with a nullptr string.
[out]NewArgvAll parsed strings are appended to NewArgv.

Definition at line 1016 of file CommandLine.cpp.

References tokenizeWindowsCommandLineImpl().

Referenced by expandResponseFiles().

◆ TokenizeWindowsCommandLineNoCopy()

void llvm::cl::TokenizeWindowsCommandLineNoCopy ( StringRef  Source,
StringSaver Saver,
SmallVectorImpl< StringRef > &  NewArgv 
)

Tokenizes a Windows command line while attempting to avoid copies.

If no quoting or escaping was used, this produces substrings of the original string. If a token requires unquoting, it will be allocated with the StringSaver.

Definition at line 1028 of file CommandLine.cpp.

References tokenizeWindowsCommandLineImpl().

◆ values()

template<typename... OptsTy>
ValuesClass llvm::cl::values ( OptsTy...  Options)

Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to the ValuesClass constructor.

Definition at line 697 of file CommandLine.h.

References Options.

Referenced by llvm::DenseMapInfo< std::tuple< Ts... > >::getHashValue(), llvm::DenseMapInfo< std::tuple< Ts... > >::getHashValueImpl(), and llvm::codegen::RegisterCodeGenFlags::RegisterCodeGenFlags().

Variable Documentation

◆ AllSubCommands

ManagedStatic< SubCommand > llvm::cl::AllSubCommands

Definition at line 493 of file CommandLine.cpp.

Referenced by llvm::cl::Option::isInAllSubCommands().

◆ TopLevelSubCommand

Definition at line 490 of file CommandLine.cpp.

llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::cl::getRegisteredOptions
StringMap< Option * > & getRegisteredOptions(SubCommand &Sub= *TopLevelSubCommand)
Use this to get a StringMap to all registered named options (e.g.
Definition: CommandLine.cpp:2643
information
The object format emitted by the WebAssembly backed is documented see the home and packaging for producing WebAssembly applications that can run in browsers and other environments wasi sdk provides a more minimal C C SDK based on llvm and a libc based on for producing WebAssemmbly applictions that use the WASI ABI Rust provides WebAssembly support integrated into Cargo There are two main which provides a relatively minimal environment that has an emphasis on being native wasm32 unknown which uses Emscripten internally and provides standard C C filesystem GL and SDL bindings For more information
Definition: README.txt:29
llvm::cl::ParseCommandLineOptions
bool ParseCommandLineOptions(int argc, const char *const *argv, StringRef Overview="", raw_ostream *Errs=nullptr, const char *EnvVar=nullptr, bool LongOptionsUseDoubleDash=false)
Definition: CommandLine.cpp:1297
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
cl
http eax xorl edx cl sete al setne dl sall cl
Definition: README.txt:25
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
generate_mock_model.main
def main(argv)
Definition: generate_mock_model.py:58
llvm::cl::getRegisteredSubcommands
iterator_range< typename SmallPtrSet< SubCommand *, 4 >::iterator > getRegisteredSubcommands()
Use this to get all registered SubCommands from the provided parser.
Definition: CommandLine.cpp:2652