10 #ifndef LLVM_OPTION_OPTTABLE_H
11 #define LLVM_OPTION_OPTTABLE_H
52 const Info *OptionInfos;
53 unsigned NumOptionInfos;
56 unsigned TheInputOptionID;
57 unsigned TheUnknownOptionID;
61 unsigned FirstSearchableIndex;
66 std::string PrefixChars;
70 unsigned id = Opt.
getID();
71 assert(
id > 0 &&
id - 1 <
getNumOptions() &&
"Invalid Option ID.");
72 return OptionInfos[
id - 1];
76 OptTable(
const Info *_OptionInfos,
unsigned _NumOptionInfos,
77 bool _IgnoreCase =
false);
92 return getInfo(
id).
Name;
97 return getInfo(
id).
Kind;
131 unsigned FlagsToInclude = 0,
132 unsigned FlagsToExclude = 0)
const;
155 const char*
const *ArgEnd,
156 unsigned &MissingArgIndex,
157 unsigned &MissingArgCount,
158 unsigned FlagsToInclude = 0,
159 unsigned FlagsToExclude = 0)
const;
170 const char *Title,
unsigned FlagsToInclude,
171 unsigned FlagsToExclude)
const;
174 const char *Title,
bool ShowHidden =
false)
const;
const char * getOptionHelpText(OptSpecifier id) const
Get the help text to use to describe this option.
InputArgList * ParseArgs(const char *const *ArgBegin, const char *const *ArgEnd, unsigned &MissingArgIndex, unsigned &MissingArgCount, unsigned FlagsToInclude=0, unsigned FlagsToExclude=0) const
Parse an list of arguments into an InputArgList.
A concrete instance of a particular driver option.
Provide access to the Option info table.
const char *const * Prefixes
OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos, bool _IgnoreCase=false)
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.
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...