9#ifndef LLVM_OPTION_OPTION_H
10#define LLVM_OPTION_OPTION_H
88 return Info !=
nullptr;
125 return Owner->getStrTable().getCString(
Info->AliasArgsOffset);
130 return Info->hasAliasArgs();
144 return Owner->getOptionPrefixedName(
Info->ID);
151 return Owner->getOptionHelpText(
Info->ID);
158 return Owner->getOptionMetaVar(
Info->ID);
194 return Info->Flags & Val;
199 return Info->Visibility & Val;
227 return Owner->isValidForSubCommand(
Info, SubCommand);
243 bool GroupedShortOption,
244 unsigned &Index)
const;
248 unsigned &Index)
const;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallVector class.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
ArgList - Ordered collection of driver arguments.
A concrete instance of a particular driver option.
OptSpecifier - Wrapper class for abstracting references to option IDs.
Provide access to the Option info table.
const Option getAlias() const
LLVM_ABI void dump() const
unsigned getNumArgs() const
bool isRegisteredSC(StringRef SubCommand) const
const char * getAliasArgs() const
Get the alias arguments as a \0 separated list.
RenderStyleKind getRenderStyle() const
const Option getGroup() const
const Option getUnaliasedOption() const
getUnaliasedOption - Return the final option this option aliases (itself, if the option has no alias)...
LLVM_ABI bool matches(OptSpecifier ID) const
matches - Predicate for whether this option is part of the given option (which may be a group).
LLVM_ABI Option(const OptTable::Info *Info, const OptTable *Owner)
StringRef getRenderName() const
getRenderName - Return the name to use when rendering this option.
bool hasFlag(unsigned Val) const
Test if this option has the flag Val.
bool hasNoOptAsInput() const
@ RemainingArgsJoinedClass
bool hasAliasArgs() const
StringRef getPrefix() const
Get the default prefix for this option.
bool hasVisibilityFlag(unsigned Val) const
Test if this option has the visibility flag Val.
const OptTable::Info * Info
StringRef getPrefixedName() const
Get the name of this option with the default prefix.
StringRef getMetaVar() const
Get the meta-variable list for this option.
StringRef getHelpText() const
Get the help text for this option.
StringRef getName() const
Get the name of this option without any prefix.
LLVM_ABI std::unique_ptr< Arg > accept(const ArgList &Args, StringRef CurArg, bool GroupedShortOption, unsigned &Index) const
Potentially accept the current argument, returning a new Arg instance, or 0 if the option does not ac...
OptionClass getKind() const
LLVM_ABI void print(raw_ostream &O, bool AddNewLine=true) const
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
SmallVector< const char *, 16 > ArgStringList
ArgStringList - Type used for constructing argv lists for subprocesses.
DriverFlag
Base flags for all options. Custom flags may be added after.
This is an optimization pass for GlobalISel generic memory operations.
Entry for a single option instance in the option data table.