LLVM  4.0.0
Public Member Functions | List of all members
llvm::opt::DerivedArgList Class Referencefinal

DerivedArgList - An ordered collection of driver arguments, whose storage may be in another argument list. More...

#include <ArgList.h>

Inheritance diagram for llvm::opt::DerivedArgList:
[legend]
Collaboration diagram for llvm::opt::DerivedArgList:
[legend]

Public Member Functions

 DerivedArgList (const InputArgList &BaseArgs)
 Construct a new derived arg list from BaseArgs. More...
 
const char * getArgString (unsigned Index) const override
 getArgString - Return the input argument string at Index. More...
 
unsigned getNumInputArgStrings () const override
 getNumInputArgStrings - Return the number of original argument strings, which are guaranteed to be the first strings in the argument string list. More...
 
const InputArgListgetBaseArgs () const
 
Arg Synthesis
void AddSynthesizedArg (Arg *A)
 AddSynthesizedArg - Add a argument to the list of synthesized arguments (to be freed). More...
 
const char * MakeArgStringRef (StringRef Str) const override
 Construct a constant string pointer whose lifetime will match that of the ArgList. More...
 
void AddFlagArg (const Arg *BaseArg, const Option Opt)
 AddFlagArg - Construct a new FlagArg for the given option Id and append it to the argument list. More...
 
void AddPositionalArg (const Arg *BaseArg, const Option Opt, StringRef Value)
 AddPositionalArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list. More...
 
void AddSeparateArg (const Arg *BaseArg, const Option Opt, StringRef Value)
 AddSeparateArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list. More...
 
void AddJoinedArg (const Arg *BaseArg, const Option Opt, StringRef Value)
 AddJoinedArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list. More...
 
ArgMakeFlagArg (const Arg *BaseArg, const Option Opt) const
 MakeFlagArg - Construct a new FlagArg for the given option Id. More...
 
ArgMakePositionalArg (const Arg *BaseArg, const Option Opt, StringRef Value) const
 MakePositionalArg - Construct a new Positional arg for the given option Id, with the provided Value. More...
 
ArgMakeSeparateArg (const Arg *BaseArg, const Option Opt, StringRef Value) const
 MakeSeparateArg - Construct a new Positional arg for the given option Id, with the provided Value. More...
 
ArgMakeJoinedArg (const Arg *BaseArg, const Option Opt, StringRef Value) const
 MakeJoinedArg - Construct a new Positional arg for the given option Id, with the provided Value. More...
 
- Public Member Functions inherited from llvm::opt::ArgList
void append (Arg *A)
 append - Append A to the arg list. More...
 
arglist_typegetArgs ()
 
const arglist_typegetArgs () const
 
unsigned size () const
 
bool hasArgNoClaim (OptSpecifier Id) const
 hasArg - Does the arg list contain any option matching Id. More...
 
bool hasArg (OptSpecifier Id) const
 
bool hasArg (OptSpecifier Id0, OptSpecifier Id1) const
 
bool hasArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const
 
ArggetLastArgNoClaim (OptSpecifier Id) const
 getLastArg - Return the last argument matching Id, or null. More...
 
ArggetLastArgNoClaim (OptSpecifier Id0, OptSpecifier Id1) const
 
ArggetLastArgNoClaim (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const
 
ArggetLastArgNoClaim (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3) const
 
ArggetLastArg (OptSpecifier Id) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3, OptSpecifier Id4) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5, OptSpecifier Id6) const
 
ArggetLastArg (OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5, OptSpecifier Id6, OptSpecifier Id7) const
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
arg_iterator filtered_begin (OptSpecifier Id0=0U, OptSpecifier Id1=0U, OptSpecifier Id2=0U) const
 
arg_iterator filtered_end () const
 
iterator_range< arg_iteratorfiltered (OptSpecifier Id0=0U, OptSpecifier Id1=0U, OptSpecifier Id2=0U) const
 
void eraseArg (OptSpecifier Id)
 eraseArg - Remove any option matching Id. More...
 
StringRef getLastArgValue (OptSpecifier Id, StringRef Default="") const
 getLastArgValue - Return the value of the last argument, or a default. More...
 
std::vector< std::string > getAllArgValues (OptSpecifier Id) const
 getAllArgValues - Get the values of all instances of the given argument as strings. More...
 
bool hasFlag (OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const
 hasFlag - Given an option Pos and its negative form Neg, return true if the option is present, false if the negation is present, and Default if neither option is given. More...
 
bool hasFlag (OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg, bool Default=true) const
 hasFlag - Given an option Pos, an alias PosAlias and its negative form Neg, return true if the option or its alias is present, false if the negation is present, and Default if none of the options are given. More...
 
void AddLastArg (ArgStringList &Output, OptSpecifier Id0) const
 AddLastArg - Render only the last argument match Id0, if present. More...
 
void AddLastArg (ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1) const
 
void AddAllArgsExcept (ArgStringList &Output, ArrayRef< OptSpecifier > Ids, ArrayRef< OptSpecifier > ExcludeIds) const
 AddAllArgsExcept - Render all arguments matching any of the given ids and not matching any of the excluded ids. More...
 
void AddAllArgs (ArgStringList &Output, ArrayRef< OptSpecifier > Ids) const
 AddAllArgs - Render all arguments matching any of the given ids. More...
 
void AddAllArgs (ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1=0U, OptSpecifier Id2=0U) const
 AddAllArgs - Render all arguments matching the given ids. More...
 
void AddAllArgValues (ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1=0U, OptSpecifier Id2=0U) const
 AddAllArgValues - Render the argument values of all arguments matching the given ids. More...
 
void AddAllArgsTranslated (ArgStringList &Output, OptSpecifier Id0, const char *Translation, bool Joined=false) const
 AddAllArgsTranslated - Render all the arguments matching the given ids, but forced to separate args and using the provided name instead of the first option value. More...
 
void ClaimAllArgs (OptSpecifier Id0) const
 ClaimAllArgs - Claim all arguments which match the given option id. More...
 
void ClaimAllArgs () const
 ClaimAllArgs - Claim all arguments. More...
 
const char * MakeArgString (const Twine &Str) const
 
const char * GetOrMakeJoinedArgString (unsigned Index, StringRef LHS, StringRef RHS) const
 Create an arg string for (LHS + RHS), reusing the string at Index if possible. More...
 
void print (raw_ostream &O) const
 
void dump () const
 

Additional Inherited Members

- Public Types inherited from llvm::opt::ArgList
typedef SmallVector< Arg *, 16 > arglist_type
 
typedef arglist_type::iterator iterator
 
typedef
arglist_type::const_iterator 
const_iterator
 
typedef
arglist_type::reverse_iterator 
reverse_iterator
 
typedef
arglist_type::const_reverse_iterator 
const_reverse_iterator
 
- Protected Member Functions inherited from llvm::opt::ArgList
 ArgList ()=default
 
 ArgList (ArgList &&RHS)
 
ArgListoperator= (ArgList &&RHS)
 
 ~ArgList ()=default
 

Detailed Description

DerivedArgList - An ordered collection of driver arguments, whose storage may be in another argument list.

Definition at line 381 of file ArgList.h.

Constructor & Destructor Documentation

DerivedArgList::DerivedArgList ( const InputArgList BaseArgs)

Construct a new derived arg list from BaseArgs.

Definition at line 397 of file ArgList.cpp.

Member Function Documentation

void llvm::opt::DerivedArgList::AddFlagArg ( const Arg BaseArg,
const Option  Opt 
)
inline

AddFlagArg - Construct a new FlagArg for the given option Id and append it to the argument list.

Definition at line 415 of file ArgList.h.

References llvm::opt::ArgList::append(), and MakeFlagArg().

void llvm::opt::DerivedArgList::AddJoinedArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
)
inline

AddJoinedArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list.

Definition at line 439 of file ArgList.h.

References llvm::opt::ArgList::append(), and MakeJoinedArg().

void llvm::opt::DerivedArgList::AddPositionalArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
)
inline

AddPositionalArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list.

Definition at line 422 of file ArgList.h.

References llvm::opt::ArgList::append(), and MakePositionalArg().

void llvm::opt::DerivedArgList::AddSeparateArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
)
inline

AddSeparateArg - Construct a new Positional arg for the given option Id, with the provided Value and append it to the argument list.

Definition at line 431 of file ArgList.h.

References llvm::opt::ArgList::append(), and MakeSeparateArg().

void DerivedArgList::AddSynthesizedArg ( Arg A)

AddSynthesizedArg - Add a argument to the list of synthesized arguments (to be freed).

Definition at line 404 of file ArgList.cpp.

const char* llvm::opt::DerivedArgList::getArgString ( unsigned  Index) const
inlineoverridevirtual

getArgString - Return the input argument string at Index.

Implements llvm::opt::ArgList.

Definition at line 391 of file ArgList.h.

References llvm::opt::InputArgList::getArgString().

const InputArgList& llvm::opt::DerivedArgList::getBaseArgs ( ) const
inline

Definition at line 399 of file ArgList.h.

unsigned llvm::opt::DerivedArgList::getNumInputArgStrings ( ) const
inlineoverridevirtual

getNumInputArgStrings - Return the number of original argument strings, which are guaranteed to be the first strings in the argument string list.

Implements llvm::opt::ArgList.

Definition at line 395 of file ArgList.h.

References llvm::opt::InputArgList::getNumInputArgStrings().

const char * DerivedArgList::MakeArgStringRef ( StringRef  Str) const
overridevirtual

Construct a constant string pointer whose lifetime will match that of the ArgList.

Implements llvm::opt::ArgList.

Definition at line 400 of file ArgList.cpp.

References llvm::opt::ArgList::MakeArgString().

Arg * DerivedArgList::MakeFlagArg ( const Arg BaseArg,
const Option  Opt 
) const

MakeFlagArg - Construct a new FlagArg for the given option Id.

Definition at line 408 of file ArgList.cpp.

References llvm::opt::Option::getName(), llvm::opt::Option::getPrefix(), llvm::opt::ArgList::MakeArgString(), and llvm::opt::InputArgList::MakeIndex().

Referenced by AddFlagArg().

Arg * DerivedArgList::MakeJoinedArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
) const

MakeJoinedArg - Construct a new Positional arg for the given option Id, with the provided Value.

Definition at line 433 of file ArgList.cpp.

References llvm::opt::InputArgList::getArgString(), llvm::opt::Option::getName(), llvm::opt::Option::getPrefix(), llvm::opt::ArgList::MakeArgString(), llvm::opt::InputArgList::MakeIndex(), and llvm::StringRef::size().

Referenced by AddJoinedArg().

Arg * DerivedArgList::MakePositionalArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
) const

MakePositionalArg - Construct a new Positional arg for the given option Id, with the provided Value.

Definition at line 415 of file ArgList.cpp.

References llvm::opt::InputArgList::getArgString(), llvm::opt::Option::getName(), llvm::opt::Option::getPrefix(), llvm::opt::ArgList::MakeArgString(), and llvm::opt::InputArgList::MakeIndex().

Referenced by AddPositionalArg().

Arg * DerivedArgList::MakeSeparateArg ( const Arg BaseArg,
const Option  Opt,
StringRef  Value 
) const

MakeSeparateArg - Construct a new Positional arg for the given option Id, with the provided Value.

Definition at line 424 of file ArgList.cpp.

References llvm::opt::InputArgList::getArgString(), llvm::opt::Option::getName(), llvm::opt::Option::getPrefix(), llvm::opt::ArgList::MakeArgString(), and llvm::opt::InputArgList::MakeIndex().

Referenced by AddSeparateArg().


The documentation for this class was generated from the following files: