14 #ifndef LLVM_OPTION_ARG_H 15 #define LLVM_OPTION_ARG_H 53 mutable unsigned Claimed : 1;
56 mutable unsigned OwnsValues : 1;
64 std::unique_ptr<Arg> Alias;
68 const Arg *BaseArg =
nullptr);
70 const char *Value0,
const Arg *BaseArg =
nullptr);
72 const char *Value0,
const char *Value1,
const Arg *BaseArg =
nullptr);
94 return BaseArg ? *BaseArg : *
this;
101 void setAlias(std::unique_ptr<Arg> Alias) { this->Alias = std::move(Alias); }
122 if (Values[i] == Value)
151 #endif // LLVM_OPTION_ARG_H const Arg * getAlias() const
Args are converted to their unaliased form.
bool containsValue(StringRef Value) const
unsigned getNumValues() const
This class represents lattice values for constants.
void print(raw_ostream &O) const
void renderAsInput(const ArgList &Args, ArgStringList &Output) const
Append the argument, render as an input, onto the given array as strings.
std::string getAsString(const ArgList &Args) const
Return a formatted version of the argument and its values, for diagnostics.
const Option & getOption() const
void setBaseArg(const Arg *BaseArg)
bool getOwnsValues() const
SmallVectorImpl< const char * > & getValues()
Arg(const Option Opt, StringRef Spelling, unsigned Index, const Arg *BaseArg=nullptr)
Option - Abstract representation for a single form of driver argument.
A concrete instance of a particular driver option.
unsigned getIndex() const
const Arg & getBaseArg() const
Return the base argument which generated this arg.
void claim() const
Set the Arg claimed bit.
StringRef getSpelling() const
Returns the used prefix and name of the option: For --foo=bar, returns --foo=.
void setAlias(std::unique_ptr< Arg > Alias)
Arg & operator=(const Arg &)=delete
void setOwnsValues(bool Value) const
void render(const ArgList &Args, ArgStringList &Output) const
Append the argument onto the given array as strings.
LLVM Value Representation.
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.
const char * getValue(unsigned N=0) const
const SmallVectorImpl< const char * > & getValues() const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.