Go to the documentation of this file.
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;
148 #endif // LLVM_OPTION_ARG_H
std::string getAsString(const ArgList &Args) const
Return a formatted version of the argument and its values, for diagnostics.
This is an optimization pass for GlobalISel generic memory operations.
A concrete instance of a particular driver option.
ArgList - Ordered collection of driver arguments.
void setBaseArg(const Arg *BaseArg)
void claim() const
Set the Arg claimed bit.
void print(raw_ostream &O) const
unsigned getIndex() const
void setAlias(std::unique_ptr< Arg > Alias)
const Option & getOption() const
SmallVectorImpl< const char * > & getValues()
void setOwnsValues(bool Value) const
unsigned getNumValues() const
bool getOwnsValues() const
This class implements an extremely fast bulk output stream that can only output to a stream.
const SmallVectorImpl< const char * > & getValues() const
const char * getValue(unsigned N=0) const
const Arg * getAlias() const
Args are converted to their unaliased form.
StringRef getSpelling() const
Returns the used prefix and name of the option: For --foo=bar, returns --foo=.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
void render(const ArgList &Args, ArgStringList &Output) const
Append the argument onto the given array as strings.
const Arg & getBaseArg() const
Return the base argument which generated this arg.
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
StringRef - Represent a constant reference to a string, i.e.
void renderAsInput(const ArgList &Args, ArgStringList &Output) const
Append the argument, render as an input, onto the given array as strings.
bool containsValue(StringRef Value) const
Option - Abstract representation for a single form of driver argument.
Arg & operator=(const Arg &)=delete
Arg(const Option Opt, StringRef Spelling, unsigned Index, const Arg *BaseArg=nullptr)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
LLVM Value Representation.