10 #ifndef LLVM_OPTION_OPTTABLE_H 11 #define LLVM_OPTION_OPTTABLE_H 61 std::vector<Info> OptionInfos;
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;
110 return getInfo(
id).GroupID;
115 return getInfo(
id).HelpText;
121 return getInfo(
id).MetaVar;
144 unsigned short DisableFlags)
const;
163 unsigned FlagsToInclude = 0,
unsigned FlagsToExclude = 0,
164 unsigned MinimumLength = 4)
const;
192 unsigned FlagsToInclude = 0,
193 unsigned FlagsToExclude = 0)
const;
214 unsigned &MissingArgCount,
unsigned FlagsToInclude = 0,
215 unsigned FlagsToExclude = 0)
const;
230 unsigned FlagsToInclude,
unsigned FlagsToExclude,
231 bool ShowAllAliases)
const;
234 bool ShowHidden =
false,
bool ShowAllAliases =
false)
const;
241 #endif // LLVM_OPTION_OPTTABLE_H
unsigned getNumOptions() const
Return the total number of option classes.
This class represents lattice values for constants.
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.
unsigned getOptionGroupID(OptSpecifier id) const
Get the group id for the given option.
std::vector< std::string > findByPrefix(StringRef Cur, unsigned short DisableFlags) const
Find flags from OptTable which starts with Cur.
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.
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.
size_t size() const
size - Get the array size.
const char *const * Prefixes
A null terminated array of prefix strings to apply to name while matching.
const Option getOption(OptSpecifier Opt) const
Get the given Opt's Option instance, lazily creating it if necessary.
const char * getOptionName(OptSpecifier id) const
Lookup the name of the given option.
std::vector< std::string > suggestValueCompletions(StringRef Option, StringRef Arg) const
Find possible value for given flags.
unsigned findNearest(StringRef Option, std::string &NearestString, unsigned FlagsToInclude=0, unsigned FlagsToExclude=0, unsigned MinimumLength=4) const
Find the OptTable option that most closely matches the given string.
unsigned getOptionKind(OptSpecifier id) const
Get the kind of the given option.
amdgpu Simplify well known AMD library false Value Value * Arg
OptSpecifier - Wrapper class for abstracting references to option IDs.
Entry for a single option instance in the option data table.
bool addValues(const char *Option, const char *Values)
Add Values to Option's Values class.
const char * getOptionHelpText(OptSpecifier id) const
Get the help text to use to describe this option.
const char * getOptionMetaVar(OptSpecifier id) const
Get the meta-variable name to use when describing this options values in the help text...
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.
void PrintHelp(raw_ostream &OS, const char *Usage, const char *Title, unsigned FlagsToInclude, unsigned FlagsToExclude, bool ShowAllAliases) const
Render the help text for an option table.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.