|
LLVM 24.0.0git
|
The option table of an options struct. More...
#include "llvm/Option/OptionsStruct.h"
Public Member Functions | |
| OptionsStructTable (const Tables &T, unsigned UnknownID) | |
| ~OptionsStructTable () override | |
| Error | parseToolArgs (int Argc, const char *const *Argv, StringSaver &Saver, function_ref< bool(const Arg &)> Apply, SmallVectorImpl< StringRef > &Inputs) const |
| Public Member Functions inherited from llvm::opt::OptTable | |
| bool | isValidForSubCommand (const Info *CandidateInfo, StringRef SubCommand) const |
| virtual | ~OptTable () |
| const StringTable & | getStrTable () const |
| Return the string table used for option names. | |
| ArrayRef< SubCommand > | getSubCommands () const |
| ArrayRef< StringTable::Offset > | getPrefixesTable () const |
| Return the prefixes table used for option names. | |
| unsigned | getNumOptions () const |
| Return the total number of option classes. | |
| unsigned | getOptionID (const Info &I) const |
| const Option | getOption (OptSpecifier Opt) const |
| Get the given Opt's Option instance, lazily creating it if necessary. | |
| StringRef | getOptionName (OptSpecifier id) const |
| Lookup the name of the given option. | |
| StringRef | getOptionPrefix (OptSpecifier id) const |
| Lookup the prefix of the given option. | |
| void | appendOptionPrefixes (OptSpecifier id, SmallVectorImpl< StringRef > &Prefixes) const |
| StringRef | getOptionPrefixedName (OptSpecifier id) const |
| Lookup the prefixed name of the given option. | |
| const InfoExtra & | getExtra (const Info &I) const |
| unsigned | getOptionKind (OptSpecifier id) const |
| Get the kind of the given option. | |
| unsigned | getOptionGroupID (OptSpecifier id) const |
| Get the group id for the given option. | |
| StringRef | getOptionHelpText (OptSpecifier id) const |
| Get the help text to use to describe this option. | |
| StringRef | getOptionHelpText (OptSpecifier id, Visibility VisibilityMask) const |
| StringRef | getOptionMetaVar (OptSpecifier id) const |
| Get the meta-variable name to use when describing this options values in the help text. | |
| const char * | getOptionAliasArgs (OptSpecifier id) const |
| Get the alias arguments as a \0 separated list, e.g. "foo\0bar\0". | |
| void | setInitialOptionsFromEnvironment (const char *E) |
| Specify the environment variable where initial options should be read. | |
| void | setGroupedShortOptions (bool Value) |
| Support grouped short options. e.g. -ab represents -a -b. | |
| void | setDashDashParsing (bool Value) |
| Set whether "--" stops option parsing and treats all subsequent arguments as positional. | |
| std::vector< std::string > | suggestValueCompletions (StringRef Option, StringRef Arg) const |
| Find possible value for given flags. | |
| std::vector< std::string > | findByPrefix (StringRef Cur, Visibility VisibilityMask, unsigned int DisableFlags) const |
| Find flags from OptTable which starts with Cur. | |
| unsigned | findNearest (StringRef Option, std::string &NearestString, Visibility VisibilityMask=Visibility(), unsigned MinimumLength=4, unsigned MaximumDistance=UINT_MAX) const |
| Find the OptTable option that most closely matches the given string. | |
| unsigned | findNearest (StringRef Option, std::string &NearestString, unsigned FlagsToInclude, unsigned FlagsToExclude=0, unsigned MinimumLength=4, unsigned MaximumDistance=UINT_MAX) const |
| bool | findExact (StringRef Option, std::string &ExactString, Visibility VisibilityMask=Visibility()) const |
| bool | findExact (StringRef Option, std::string &ExactString, unsigned FlagsToInclude, unsigned FlagsToExclude=0) const |
| std::unique_ptr< Arg > | ParseOneArg (const ArgList &Args, unsigned &Index, Visibility VisibilityMask=Visibility()) const |
| Parse a single argument; returning the new argument and updating Index. | |
| std::unique_ptr< Arg > | ParseOneArg (const ArgList &Args, unsigned &Index, unsigned FlagsToInclude, unsigned FlagsToExclude) const |
| InputArgList | ParseArgs (ArrayRef< const char * > Args, unsigned &MissingArgIndex, unsigned &MissingArgCount, Visibility VisibilityMask=Visibility()) const |
| Parse an list of arguments into an InputArgList. | |
| InputArgList | ParseArgs (ArrayRef< const char * > Args, unsigned &MissingArgIndex, unsigned &MissingArgCount, unsigned FlagsToInclude, unsigned FlagsToExclude=0) const |
| InputArgList | parseArgs (int Argc, char *const *Argv, OptSpecifier Unknown, StringSaver &Saver, std::function< void(StringRef)> ErrorFn) const |
| A convenience helper which handles optional initial options populated from an environment variable, expands response files recursively and parses options. | |
| void | printHelp (raw_ostream &OS, const char *Usage, const char *Title, bool ShowHidden=false, bool ShowAllAliases=false, Visibility VisibilityMask=Visibility(), StringRef SubCommand={}) const |
| Render the help text for an option table. | |
| void | printHelp (raw_ostream &OS, const char *Usage, const char *Title, unsigned FlagsToInclude, unsigned FlagsToExclude, bool ShowAllAliases) const |
Additional Inherited Members | |
| Public Types inherited from llvm::opt::OptTable | |
| using | ValuesCodeFnTy = StringRef (*)(unsigned) |
| Values of options declared with TableGen ValuesCode: only the generated code knows them, so they cannot go in the string table. | |
| Protected Member Functions inherited from llvm::opt::OptTable | |
| OptTable (const Tables &Tables, bool IgnoreCase=false) | |
| void | setValuesCodeFn (ValuesCodeFnTy Fn) |
The option table of an options struct.
Definition at line 133 of file OptionsStruct.h.
Definition at line 135 of file OptionsStruct.h.
References llvm::opt::OptTable::OptTable(), llvm::opt::OptTable::setDashDashParsing(), and T.
|
overridedefault |
References parseToolArgs().
| Error OptionsStructTable::parseToolArgs | ( | int | Argc, |
| const char *const * | Argv, | ||
| StringSaver & | Saver, | ||
| function_ref< bool(const Arg &)> | Apply, | ||
| SmallVectorImpl< StringRef > & | Inputs ) const |
Definition at line 20 of file LibraryOptions.cpp.
References A(), llvm::createStringError(), llvm::opt::Option::InputClass, llvm::List, Msg, llvm::opt::OptTable::parseArgs(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::Error::success().
Referenced by ~OptionsStructTable().