class ArgList
Declaration
class ArgList { /* full declaration omitted */ };
Description
ArgList - Ordered collection of driver arguments. The ArgList class manages a list of Arg instances as well as auxiliary data and convenience methods to allow Tools to quickly check for the presence of Arg instances for a particular Option and to iterate over groups of arguments.
Declared at: llvm/include/llvm/Option/ArgList.h:116
Method Overview
- public void AddAllArgValues(llvm::opt::ArgStringList & Output, llvm::opt::OptSpecifier Id0, llvm::opt::OptSpecifier Id1 = 0U, llvm::opt::OptSpecifier Id2 = 0U) const
- public void AddAllArgs(llvm::opt::ArgStringList & Output, llvm::opt::OptSpecifier Id0, llvm::opt::OptSpecifier Id1 = 0U, llvm::opt::OptSpecifier Id2 = 0U) const
- public void AddAllArgs(llvm::opt::ArgStringList & Output, ArrayRef<llvm::opt::OptSpecifier> Ids) const
- public void AddAllArgsExcept(llvm::opt::ArgStringList & Output, ArrayRef<llvm::opt::OptSpecifier> Ids, ArrayRef<llvm::opt::OptSpecifier> ExcludeIds) const
- public void AddAllArgsTranslated(llvm::opt::ArgStringList & Output, llvm::opt::OptSpecifier Id0, const char * Translation, bool Joined = false) const
- public template <typename... OptSpecifiers>void AddLastArg(llvm::opt::ArgStringList & Output, OptSpecifiers... Ids) const
- protected ArgList(llvm::opt::ArgList && RHS)
- protected ArgList()
- public void ClaimAllArgs() const
- public void ClaimAllArgs(llvm::opt::OptSpecifier Id0) const
- public const char * GetOrMakeJoinedArgString(unsigned int Index, llvm::StringRef LHS, llvm::StringRef RHS) const
- public const char * MakeArgString(const llvm::Twine & Str) const
- public virtual const char * MakeArgStringRef(llvm::StringRef Str) const
- public void append(llvm::opt::Arg * A)
- public llvm::opt::ArgList::const_iterator begin() const
- public llvm::opt::ArgList::iterator begin()
- public void dump() const
- public llvm::opt::ArgList::iterator end()
- public llvm::opt::ArgList::const_iterator end() const
- public void eraseArg(llvm::opt::OptSpecifier Id)
- public template <typename... OptSpecifiers>iterator_range<filtered_iterator<sizeof...(OptSpecifiers)>> filtered(OptSpecifiers... Ids) const
- public template <typename... OptSpecifiers>iterator_range<filtered_reverse_iterator<sizeof...(OptSpecifiers)>> filtered_reverse(OptSpecifiers... Ids) const
- public std::vector<std::string> getAllArgValues(llvm::opt::OptSpecifier Id) const
- public virtual const char * getArgString(unsigned int Index) const
- public const llvm::opt::ArgList::arglist_type & getArgs() const
- public template <typename... OptSpecifiers>llvm::opt::Arg * getLastArg(OptSpecifiers... Ids) const
- public template <typename... OptSpecifiers>llvm::opt::Arg * getLastArgNoClaim(OptSpecifiers... Ids) const
- public llvm::StringRef getLastArgValue(llvm::opt::OptSpecifier Id, llvm::StringRef Default = "") const
- public virtual unsigned int getNumInputArgStrings() const
- public template <typename... OptSpecifiers>bool hasArg(OptSpecifiers... Ids) const
- public template <typename... OptSpecifiers>bool hasArgNoClaim(OptSpecifiers... Ids) const
- public bool hasFlag(llvm::opt::OptSpecifier Pos, llvm::opt::OptSpecifier Neg, bool Default = true) const
- public bool hasFlag(llvm::opt::OptSpecifier Pos, llvm::opt::OptSpecifier PosAlias, llvm::opt::OptSpecifier Neg, bool Default = true) const
- public void print(llvm::raw_ostream & O) const
- public llvm::opt::ArgList::reverse_iterator rbegin()
- public llvm::opt::ArgList::const_reverse_iterator rbegin() const
- public llvm::opt::ArgList::const_reverse_iterator rend() const
- public llvm::opt::ArgList::reverse_iterator rend()
- public unsigned int size() const
- protected static llvm::opt::OptSpecifier toOptSpecifier(llvm::opt::OptSpecifier S)
- protected ~ArgList()
Methods
¶void AddAllArgValues(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
llvm::opt::OptSpecifier Id1 = 0U,
llvm::opt::OptSpecifier Id2 = 0U) const
void AddAllArgValues(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
llvm::opt::OptSpecifier Id1 = 0U,
llvm::opt::OptSpecifier Id2 = 0U) const
Description
AddAllArgValues - Render the argument values of all arguments matching the given ids.
Declared at: llvm/include/llvm/Option/ArgList.h:324
Parameters
- llvm::opt::ArgStringList& Output
- llvm::opt::OptSpecifier Id0
- llvm::opt::OptSpecifier Id1 = 0U
- llvm::opt::OptSpecifier Id2 = 0U
¶void AddAllArgs(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
llvm::opt::OptSpecifier Id1 = 0U,
llvm::opt::OptSpecifier Id2 = 0U) const
void AddAllArgs(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
llvm::opt::OptSpecifier Id1 = 0U,
llvm::opt::OptSpecifier Id2 = 0U) const
Description
AddAllArgs - Render all arguments matching the given ids.
Declared at: llvm/include/llvm/Option/ArgList.h:319
Parameters
- llvm::opt::ArgStringList& Output
- llvm::opt::OptSpecifier Id0
- llvm::opt::OptSpecifier Id1 = 0U
- llvm::opt::OptSpecifier Id2 = 0U
¶void AddAllArgs(
llvm::opt::ArgStringList& Output,
ArrayRef<llvm::opt::OptSpecifier> Ids) const
void AddAllArgs(
llvm::opt::ArgStringList& Output,
ArrayRef<llvm::opt::OptSpecifier> Ids) const
Description
AddAllArgs - Render all arguments matching any of the given ids.
Declared at: llvm/include/llvm/Option/ArgList.h:316
Parameters
- llvm::opt::ArgStringList& Output
- ArrayRef<llvm::opt::OptSpecifier> Ids
¶void AddAllArgsExcept(
llvm::opt::ArgStringList& Output,
ArrayRef<llvm::opt::OptSpecifier> Ids,
ArrayRef<llvm::opt::OptSpecifier> ExcludeIds)
const
void AddAllArgsExcept(
llvm::opt::ArgStringList& Output,
ArrayRef<llvm::opt::OptSpecifier> Ids,
ArrayRef<llvm::opt::OptSpecifier> ExcludeIds)
const
Description
AddAllArgsExcept - Render all arguments matching any of the given ids and not matching any of the excluded ids.
Declared at: llvm/include/llvm/Option/ArgList.h:313
Parameters
- llvm::opt::ArgStringList& Output
- ArrayRef<llvm::opt::OptSpecifier> Ids
- ArrayRef<llvm::opt::OptSpecifier> ExcludeIds
¶void AddAllArgsTranslated(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
const char* Translation,
bool Joined = false) const
void AddAllArgsTranslated(
llvm::opt::ArgStringList& Output,
llvm::opt::OptSpecifier Id0,
const char* Translation,
bool Joined = false) const
Description
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.
Declared at: llvm/include/llvm/Option/ArgList.h:333
Parameters
- llvm::opt::ArgStringList& Output
- llvm::opt::OptSpecifier Id0
- const char* Translation
- bool Joined = false
- - If true, render the argument as joined with the option specifier.
¶template <typename... OptSpecifiers>
void AddLastArg(llvm::opt::ArgStringList& Output,
OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
void AddLastArg(llvm::opt::ArgStringList& Output,
OptSpecifiers... Ids) const
Description
Render only the last argument match \p Id0, if present.
Declared at: llvm/include/llvm/Option/ArgList.h:306
Templates
- OptSpecifiers
Parameters
- llvm::opt::ArgStringList& Output
- OptSpecifiers... Ids
¶ArgList(llvm::opt::ArgList&& RHS)
ArgList(llvm::opt::ArgList&& RHS)
Declared at: llvm/include/llvm/Option/ArgList.h:155
Parameters
- llvm::opt::ArgList&& RHS
¶ArgList()
ArgList()
Declared at: llvm/include/llvm/Option/ArgList.h:148
¶void ClaimAllArgs() const
void ClaimAllArgs() const
Description
ClaimAllArgs - Claim all arguments.
Declared at: llvm/include/llvm/Option/ArgList.h:343
¶void ClaimAllArgs(
llvm::opt::OptSpecifier Id0) const
void ClaimAllArgs(
llvm::opt::OptSpecifier Id0) const
Description
ClaimAllArgs - Claim all arguments which match the given option id.
Declared at: llvm/include/llvm/Option/ArgList.h:339
Parameters
¶const char* GetOrMakeJoinedArgString(
unsigned int Index,
llvm::StringRef LHS,
llvm::StringRef RHS) const
const char* GetOrMakeJoinedArgString(
unsigned int Index,
llvm::StringRef LHS,
llvm::StringRef RHS) const
Description
Create an arg string for (\p LHS + \p RHS), reusing the string at \p Index if possible.
Declared at: llvm/include/llvm/Option/ArgList.h:359
Parameters
- unsigned int Index
- llvm::StringRef LHS
- llvm::StringRef RHS
¶const char* MakeArgString(
const llvm::Twine& Str) const
const char* MakeArgString(
const llvm::Twine& Str) const
Declared at: llvm/include/llvm/Option/ArgList.h:352
Parameters
- const llvm::Twine& Str
¶virtual const char* MakeArgStringRef(
llvm::StringRef Str) const
virtual const char* MakeArgStringRef(
llvm::StringRef Str) const
Description
Construct a constant string pointer whose lifetime will match that of the ArgList.
Declared at: llvm/include/llvm/Option/ArgList.h:351
Parameters
- llvm::StringRef Str
¶void append(llvm::opt::Arg* A)
void append(llvm::opt::Arg* A)
Description
append - Append \p A to the arg list.
Declared at: llvm/include/llvm/Option/ArgList.h:181
Parameters
¶llvm::opt::ArgList::const_iterator begin() const
llvm::opt::ArgList::const_iterator begin() const
Declared at: llvm/include/llvm/Option/ArgList.h:197
¶llvm::opt::ArgList::iterator begin()
llvm::opt::ArgList::iterator begin()
Description
@ } @ {
Declared at: llvm/include/llvm/Option/ArgList.h:191
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/Option/ArgList.h:363
¶llvm::opt::ArgList::iterator end()
llvm::opt::ArgList::iterator end()
Declared at: llvm/include/llvm/Option/ArgList.h:192
¶llvm::opt::ArgList::const_iterator end() const
llvm::opt::ArgList::const_iterator end() const
Declared at: llvm/include/llvm/Option/ArgList.h:198
¶void eraseArg(llvm::opt::OptSpecifier Id)
void eraseArg(llvm::opt::OptSpecifier Id)
Description
eraseArg - Remove any option matching \p Id.
Declared at: llvm/include/llvm/Option/ArgList.h:230
Parameters
¶template <typename... OptSpecifiers>
iterator_range<
filtered_iterator<sizeof...(OptSpecifiers)>>
filtered(OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
iterator_range<
filtered_iterator<sizeof...(OptSpecifiers)>>
filtered(OptSpecifiers... Ids) const
Declared at: llvm/include/llvm/Option/ArgList.h:205
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶template <typename... OptSpecifiers>
iterator_range<filtered_reverse_iterator<
sizeof...(OptSpecifiers)>>
filtered_reverse(OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
iterator_range<filtered_reverse_iterator<
sizeof...(OptSpecifiers)>>
filtered_reverse(OptSpecifiers... Ids) const
Declared at: llvm/include/llvm/Option/ArgList.h:216
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶std::vector<std::string> getAllArgValues(
llvm::opt::OptSpecifier Id) const
std::vector<std::string> getAllArgValues(
llvm::opt::OptSpecifier Id) const
Description
getAllArgValues - Get the values of all instances of the given argument as strings.
Declared at: llvm/include/llvm/Option/ArgList.h:285
Parameters
¶virtual const char* getArgString(
unsigned int Index) const
virtual const char* getArgString(
unsigned int Index) const
Description
getArgString - Return the input argument string at \p Index.
Declared at: llvm/include/llvm/Option/ArgList.h:269
Parameters
- unsigned int Index
¶const llvm::opt::ArgList::arglist_type& getArgs()
const
const llvm::opt::ArgList::arglist_type& getArgs()
const
Declared at: llvm/include/llvm/Option/ArgList.h:183
¶template <typename... OptSpecifiers>
llvm::opt::Arg* getLastArg(
OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
llvm::opt::Arg* getLastArg(
OptSpecifiers... Ids) const
Description
Return the last argument matching \p Id, or null.
Declared at: llvm/include/llvm/Option/ArgList.h:250
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶template <typename... OptSpecifiers>
llvm::opt::Arg* getLastArgNoClaim(
OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
llvm::opt::Arg* getLastArgNoClaim(
OptSpecifiers... Ids) const
Description
Return the last argument matching \p Id, or null. Do not "claim" the option (don't mark it as having been used).
Declared at: llvm/include/llvm/Option/ArgList.h:262
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶llvm::StringRef getLastArgValue(
llvm::opt::OptSpecifier Id,
llvm::StringRef Default = "") const
llvm::StringRef getLastArgValue(
llvm::opt::OptSpecifier Id,
llvm::StringRef Default = "") const
Description
getLastArgValue - Return the value of the last argument, or a default.
Declared at: llvm/include/llvm/Option/ArgList.h:281
Parameters
- llvm::opt::OptSpecifier Id
- llvm::StringRef Default = ""
¶virtual unsigned int getNumInputArgStrings() const
virtual unsigned int getNumInputArgStrings() const
Description
getNumInputArgStrings - Return the number of original argument strings, which are guaranteed to be the first strings in the argument string list.
Declared at: llvm/include/llvm/Option/ArgList.h:274
¶template <typename... OptSpecifiers>
bool hasArg(OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
bool hasArg(OptSpecifiers... Ids) const
Declared at: llvm/include/llvm/Option/ArgList.h:244
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶template <typename... OptSpecifiers>
bool hasArgNoClaim(OptSpecifiers... Ids) const
template <typename... OptSpecifiers>
bool hasArgNoClaim(OptSpecifiers... Ids) const
Description
hasArg - Does the arg list contain any option matching \p Id. \p Claim Whether the argument should be claimed, if it exists.
Declared at: llvm/include/llvm/Option/ArgList.h:240
Templates
- OptSpecifiers
Parameters
- OptSpecifiers... Ids
¶bool hasFlag(llvm::opt::OptSpecifier Pos,
llvm::opt::OptSpecifier Neg,
bool Default = true) const
bool hasFlag(llvm::opt::OptSpecifier Pos,
llvm::opt::OptSpecifier Neg,
bool Default = true) const
Description
hasFlag - Given an option \p Pos and its negative form \p Neg, return true if the option is present, false if the negation is present, and\p Default if neither option is given. If both the option and its negation are present, the last one wins.
Declared at: llvm/include/llvm/Option/ArgList.h:295
Parameters
- llvm::opt::OptSpecifier Pos
- llvm::opt::OptSpecifier Neg
- bool Default = true
¶bool hasFlag(llvm::opt::OptSpecifier Pos,
llvm::opt::OptSpecifier PosAlias,
llvm::opt::OptSpecifier Neg,
bool Default = true) const
bool hasFlag(llvm::opt::OptSpecifier Pos,
llvm::opt::OptSpecifier PosAlias,
llvm::opt::OptSpecifier Neg,
bool Default = true) const
Description
hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative form \p Neg, return true if the option or its alias is present, false if the negation is present, and \p Default if none of the options are given. If multiple options are present, the last one wins.
Declared at: llvm/include/llvm/Option/ArgList.h:301
Parameters
- llvm::opt::OptSpecifier Pos
- llvm::opt::OptSpecifier PosAlias
- llvm::opt::OptSpecifier Neg
- bool Default = true
¶void print(llvm::raw_ostream& O) const
void print(llvm::raw_ostream& O) const
Declared at: llvm/include/llvm/Option/ArgList.h:362
Parameters
¶llvm::opt::ArgList::reverse_iterator rbegin()
llvm::opt::ArgList::reverse_iterator rbegin()
Declared at: llvm/include/llvm/Option/ArgList.h:194
¶llvm::opt::ArgList::const_reverse_iterator
rbegin() const
llvm::opt::ArgList::const_reverse_iterator
rbegin() const
Declared at: llvm/include/llvm/Option/ArgList.h:200
¶llvm::opt::ArgList::const_reverse_iterator rend()
const
llvm::opt::ArgList::const_reverse_iterator rend()
const
Declared at: llvm/include/llvm/Option/ArgList.h:201
¶llvm::opt::ArgList::reverse_iterator rend()
llvm::opt::ArgList::reverse_iterator rend()
Declared at: llvm/include/llvm/Option/ArgList.h:195
¶unsigned int size() const
unsigned int size() const
Declared at: llvm/include/llvm/Option/ArgList.h:185
¶static llvm::opt::OptSpecifier toOptSpecifier(
llvm::opt::OptSpecifier S)
static llvm::opt::OptSpecifier toOptSpecifier(
llvm::opt::OptSpecifier S)
Declared at: llvm/include/llvm/Option/ArgList.h:174
Parameters
¶~ArgList()
~ArgList()
Declared at: llvm/include/llvm/Option/ArgList.h:170