10 #ifndef LLVM_OPTION_OPTTABLE_H
11 #define LLVM_OPTION_OPTTABLE_H
64 unsigned TheInputOptionID = 0;
65 unsigned TheUnknownOptionID = 0;
69 unsigned FirstSearchableIndex = 0;
74 std::string PrefixChars;
78 unsigned id = Opt.
getID();
80 return OptionInfos[
id - 1];
100 return getInfo(
id).
Name;
105 return getInfo(
id).
Kind;
144 unsigned short DisableFlags)
const;
161 unsigned FlagsToInclude = 0,
162 unsigned FlagsToExclude = 0)
const;
183 unsigned &MissingArgCount,
unsigned FlagsToInclude = 0,
184 unsigned FlagsToExclude = 0)
const;
195 const char *Title,
unsigned FlagsToInclude,
196 unsigned FlagsToExclude)
const;
199 const char *Title,
bool ShowHidden =
false)
const;
206 #endif // LLVM_OPTION_OPTTABLE_H
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.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
OptTable(ArrayRef< Info > OptionInfos, bool IgnoreCase=false)
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.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
std::vector< std::string > findByPrefix(StringRef Cur, unsigned short DisableFlags) const
Find flags from OptTable which starts with Cur.
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.
std::vector< std::string > suggestValueCompletions(StringRef Option, StringRef Arg) const
Find possible value for given flags.
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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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...
StringRef - Represent a constant reference to a string, i.e.
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...