15 #ifndef LLVM_OPTION_ARG_H
16 #define LLVM_OPTION_ARG_H
33 void operator=(
const Arg &) =
delete;
53 mutable unsigned Claimed : 1;
56 mutable unsigned OwnsValues : 1;
63 const Arg *BaseArg =
nullptr);
65 const char *Value0,
const Arg *BaseArg =
nullptr);
67 const char *Value0,
const char *Value1,
const Arg *BaseArg =
nullptr);
79 return BaseArg ? *BaseArg : *
this;
101 if (Values[
i] == Value)
unsigned getIndex() const
const Option & getOption() const
const char * getValue(unsigned N=0) const
void setBaseArg(const Arg *BaseArg)
StringRef getSpelling() const
SmallVectorImpl< const char * > & getValues()
void print(raw_ostream &O) const
Option - Abstract representation for a single form of driver argument.
A concrete instance of a particular driver option.
void claim() const
Set the Arg claimed bit.
void renderAsInput(const ArgList &Args, ArgStringList &Output) const
Append the argument, render as an input, onto the given array as strings.
void render(const ArgList &Args, ArgStringList &Output) const
Append the argument onto the given array as strings.
bool getOwnsValues() const
void setOwnsValues(bool Value) const
const SmallVectorImpl< const char * > & getValues() const
unsigned getNumValues() const
LLVM_ATTRIBUTE_ALWAYS_INLINE size_type size() const
bool containsValue(StringRef Value) const
std::string getAsString(const ArgList &Args) const
Return a formatted version of the argument and its values, for debugging and diagnostics.
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 Arg & getBaseArg() const
Return the base argument which generated this arg.