14#ifndef LLVM_OPTION_ARG_H
15#define LLVM_OPTION_ARG_H
55 mutable unsigned Claimed : 1;
59 unsigned IgnoredTargetSpecific : 1;
62 mutable unsigned OwnsValues : 1;
70 std::unique_ptr<Arg> Alias;
74 const Arg *BaseArg =
nullptr);
76 const char *Value0,
const Arg *BaseArg =
nullptr);
78 const char *Value0,
const char *Value1,
const Arg *BaseArg =
nullptr);
100 return BaseArg ? *BaseArg : *
this;
108 void setAlias(std::unique_ptr<Arg> Alias) { this->Alias = std::move(Alias); }
This file defines the SmallVector class.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
ArgList - Ordered collection of driver arguments.
A concrete instance of a particular driver option.
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 containsValue(StringRef Value) const
bool getOwnsValues() const
void setAlias(std::unique_ptr< Arg > Alias)
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.
StringRef getSpelling() const
Returns the used prefix and name of the option: For --foo=bar, returns --foo=.
SmallVectorImpl< const char * > & getValues()
Arg & operator=(const Arg &)=delete
std::string getAsString(const ArgList &Args) const
Return a formatted version of the argument and its values, for diagnostics.
const Option & getOption() const
void setOwnsValues(bool Value) const
void ignoreTargetSpecific()
void setBaseArg(const Arg *BaseArg)
unsigned getNumValues() const
unsigned getIndex() const
const SmallVectorImpl< const char * > & getValues() const
const Arg * getAlias() const
Args are converted to their unaliased form.
const char * getValue(unsigned N=0) const
bool isIgnoredTargetSpecific() const
Option - Abstract representation for a single form of driver argument.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.