10 #ifndef LLVM_OPTION_OPTTABLE_H
11 #define LLVM_OPTION_OPTTABLE_H
53 const Info *OptionInfos;
54 unsigned NumOptionInfos;
57 unsigned TheInputOptionID;
58 unsigned TheUnknownOptionID;
62 unsigned FirstSearchableIndex;
67 std::string PrefixChars;
71 unsigned id = Opt.
getID();
72 assert(
id > 0 &&
id - 1 <
getNumOptions() &&
"Invalid Option ID.");
73 return OptionInfos[
id - 1];
77 OptTable(
const Info *OptionInfos,
unsigned NumOptionInfos,
78 bool IgnoreCase =
false);
94 return getInfo(
id).
Name;
99 return getInfo(
id).
Kind;
133 unsigned FlagsToInclude = 0,
134 unsigned FlagsToExclude = 0)
const;
155 unsigned &MissingArgCount,
unsigned FlagsToInclude = 0,
156 unsigned FlagsToExclude = 0)
const;
167 const char *Title,
unsigned FlagsToInclude,
168 unsigned FlagsToExclude)
const;
171 const char *Title,
bool ShowHidden =
false)
const;
InputArgList ParseArgs(ArrayRef< const char * > Args, unsigned &MissingArgIndex, unsigned &MissingArgCount, unsigned FlagsToInclude=0, unsigned FlagsToExclude=0) const
Parse an list of arguments into an InputArgList.
const char * getOptionHelpText(OptSpecifier id) const
Get the help text to use to describe this option.
OptTable(const Info *OptionInfos, unsigned NumOptionInfos, bool IgnoreCase=false)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Option - Abstract representation for a single form of driver argument.
A concrete instance of a particular driver option.
Provide access to the Option info table.
const char *const * Prefixes
A null terminated array of prefix strings to apply to name while matching.
void PrintHelp(raw_ostream &OS, const char *Name, const char *Title, unsigned FlagsToInclude, unsigned FlagsToExclude) const
Render the help text for an option table.
unsigned getNumOptions() const
Return the total number of option classes.
unsigned getOptionKind(OptSpecifier id) const
Get the kind of the given option.
const char * getOptionName(OptSpecifier id) const
Lookup the name of the given option.
OptSpecifier - Wrapper class for abstracting references to option IDs.
const Option getOption(OptSpecifier Opt) const
Get the given Opt's Option instance, lazily creating it if necessary.
Entry for a single option instance in the option data table.
Arg * ParseOneArg(const ArgList &Args, unsigned &Index, unsigned FlagsToInclude=0, unsigned FlagsToExclude=0) const
Parse a single argument; returning the new argument and updating Index.
StringSet - A wrapper for StringMap that provides set-like functionality.
This class implements an extremely fast bulk output stream that can only output to a stream...
ArgList - Ordered collection of driver arguments.
unsigned getOptionGroupID(OptSpecifier id) const
Get the group id for the given option.
const char * getOptionMetaVar(OptSpecifier id) const
Get the meta-variable name to use when describing this options values in the help text...