20 #ifndef LLVM_SUPPORT_COMMANDLINE_H 21 #define LLVM_SUPPORT_COMMANDLINE_H 38 #include <initializer_list> 40 #include <type_traits> 68 const char *Overview =
"");
176 void registerCategory();
181 : Name(Name), Description(Description) {
201 void registerSubCommand();
202 void unregisterSubCommand();
206 : Name(Name), Description(Description) {
207 registerSubCommand();
213 explicit operator bool()
const;
241 virtual bool handleOccurrence(
unsigned pos,
StringRef ArgName,
244 virtual enum ValueExpected getValueExpectedFlagDefault()
const {
249 virtual void anchor();
251 int NumOccurrences = 0;
254 unsigned Occurrences : 3;
258 unsigned HiddenFlag : 2;
259 unsigned Formatting : 2;
262 unsigned AdditionalVals = 0;
270 bool FullyInitialized =
false;
325 : Occurrences(OccurrencesFlag),
Value(0), HiddenFlag(Hidden),
331 virtual ~
Option() =
default;
341 void removeArgument();
344 virtual size_t getOptionWidth()
const = 0;
349 virtual void printOptionInfo(
size_t GlobalWidth)
const = 0;
351 virtual void printOptionValue(
size_t GlobalWidth,
bool Force)
const = 0;
353 virtual void setDefault() = 0;
356 size_t FirstLineIndentedBy);
363 bool MultiArg =
false);
372 inline void reset() { NumOccurrences = 0; }
407 template <
class Opt>
void apply(Opt &
O)
const { O.setInitialValue(Init); }
423 template <
class Opt>
void apply(Opt &
O)
const { O.setLocation(O, Loc); }
437 template <
class Opt>
void apply(Opt &
O)
const { O.setCategory(Category); }
446 template <
class Opt>
void apply(Opt &
O)
const { O.addSubCommand(Sub); }
463 virtual void anchor();
470 template <
class DataType,
bool isClass>
508 assert(Valid &&
"invalid option value");
529 template <
class DataType>
541 template <
class DataType>
572 void anchor()
override;
589 void anchor()
override;
603 #define clEnumVal(ENUMVAL, DESC) \ 604 llvm::cl::OptionEnumValue { #ENUMVAL, int(ENUMVAL), DESC } 605 #define clEnumValN(ENUMVAL, FLAGNAME, DESC) \ 606 llvm::cl::OptionEnumValue { FLAGNAME, int(ENUMVAL), DESC } 621 template <
class Opt>
void apply(Opt &
O)
const {
622 for (
auto Value : Values)
651 : Name(name), HelpStr(helpStr) {}
665 virtual unsigned getNumOptions()
const = 0;
668 virtual StringRef getOption(
unsigned N)
const = 0;
674 virtual size_t getOptionWidth(
const Option &
O)
const;
681 virtual void printOptionInfo(
const Option &O,
size_t GlobalWidth)
const;
685 size_t GlobalWidth)
const;
691 template <
class AnyOptionValue>
693 const AnyOptionValue &Default,
694 size_t GlobalWidth)
const {
695 printGenericOptionDiff(O, V, Default, GlobalWidth);
704 if (!Owner.hasArgStr())
705 for (
unsigned i = 0, e = getNumOptions(); i != e; ++i)
721 if (Owner.hasArgStr())
762 return Values[
N].HelpStr;
773 if (Owner.hasArgStr())
778 for (
size_t i = 0, e = Values.
size(); i != e; ++i)
779 if (Values[i].Name == ArgVal) {
780 V = Values[i].V.getValue();
784 return O.
error(
"Cannot find option named '" + ArgVal +
"'!");
791 assert(findOption(Name) == Values.
size() &&
"Option already exists!");
792 OptionInfo
X(Name, static_cast<DataType>(V), HelpStr);
800 unsigned N = findOption(Name);
801 assert(N != Values.
size() &&
"Option not found!");
822 size_t getOptionWidth(
const Option &
O)
const;
827 void printOptionInfo(
const Option &O,
size_t GlobalWidth)
const;
831 void printOptionNoValue(
const Option &O,
size_t GlobalWidth)
const;
837 virtual void anchor();
843 void printOptionName(
const Option &O,
size_t GlobalWidth)
const;
880 size_t GlobalWidth)
const;
883 void anchor()
override;
906 size_t GlobalWidth)
const;
909 void anchor()
override;
928 size_t GlobalWidth)
const;
931 void anchor()
override;
950 size_t GlobalWidth)
const;
953 void anchor()
override;
969 unsigned long long &Val);
975 size_t GlobalWidth)
const;
978 void anchor()
override;
997 size_t GlobalWidth)
const;
1000 void anchor()
override;
1019 size_t GlobalWidth)
const;
1022 void anchor()
override;
1044 size_t GlobalWidth)
const;
1047 void anchor()
override;
1069 size_t GlobalWidth)
const;
1072 void anchor()
override;
1084 template <
class ParserClass,
class DT>
1096 P.printOptionNoValue(O, GlobalWidth);
1111 template <
class ParserClass,
class ValDT>
1118 printer.
print(O, static_cast<const ParserClass &>(P), V, Default,
1129 template <
class Opt>
static void opt(
const Mod &M, Opt &
O) { M.apply(O); }
1172 template <
class Opt,
class Mod,
class... Mods>
1173 void apply(Opt *
O,
const Mod &M,
const Mods &... Ms) {
1178 template <
class Opt,
class Mod>
void apply(Opt *
O,
const Mod &M) {
1189 template <
class DataType,
bool ExternalStorage,
bool isClass>
1194 void check_location()
const {
1195 assert(Location &&
"cl::location(...) not specified for a command " 1196 "line option with external storage, " 1197 "or cl::init specified before cl::location()!!");
1205 return O.
error(
"cl::location(x) specified more than once!");
1211 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1236 template <
class DataType>
1241 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1242 DataType::operator=(V);
1266 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1285 template <
class DataType,
bool ExternalStorage =
false,
1289 std::is_class<DataType>::value> {
1292 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1294 typename ParserClass::parser_data_type Val =
1295 typename ParserClass::parser_data_type();
1296 if (Parser.parse(*
this, ArgName, Arg, Val))
1298 this->setValue(Val);
1299 this->setPosition(pos);
1303 enum ValueExpected getValueExpectedFlagDefault()
const override {
1304 return Parser.getValueExpectedFlagDefault();
1308 return Parser.getExtraOptionNames(OptionNames);
1312 size_t getOptionWidth()
const override {
1313 return Parser.getOptionWidth(*
this);
1316 void printOptionInfo(
size_t GlobalWidth)
const override {
1317 Parser.printOptionInfo(*
this, GlobalWidth);
1320 void printOptionValue(
size_t GlobalWidth,
bool Force)
const override {
1321 if (Force || this->getDefault().
compare(this->getValue())) {
1322 cl::printOptionDiff<ParserClass>(*
this, Parser, this->getValue(),
1323 this->getDefault(), GlobalWidth);
1327 template <
class T,
class =
typename std::enable_if<
1328 std::is_assignable<T&, T>::value>
::type>
1329 void setDefaultImpl() {
1335 template <
class T,
class =
typename std::enable_if<
1336 !std::is_assignable<T&, T>::value>
::type>
1337 void setDefaultImpl(...) {}
1339 void setDefault()
override { setDefaultImpl<DataType>(); }
1343 Parser.initialize();
1348 opt(
const opt &) =
delete;
1349 opt &operator=(
const opt &) =
delete;
1357 this->setValue(Val);
1358 return this->getValue();
1361 template <
class... Mods>
1362 explicit opt(
const Mods &... Ms)
1390 return O.
error(
"cl::location(x) specified more than once!");
1396 assert(Location != 0 &&
"cl::location(...) not specified for a command " 1397 "line option with external storage!");
1398 Location->push_back(V);
1411 std::vector<DataType> Storage;
1414 using iterator =
typename std::vector<DataType>::iterator;
1424 using size_type =
typename std::vector<DataType>::size_type;
1428 bool empty()
const {
return Storage.empty(); }
1433 using reference =
typename std::vector<DataType>::reference;
1441 return Storage.erase(first, last);
1446 return Storage.erase(first, last);
1450 return Storage.insert(pos, value);
1453 return Storage.insert(pos, value);
1457 return Storage.insert(pos, value);
1460 return Storage.insert(pos, value);
1466 operator std::vector<DataType>&() {
return Storage; }
1469 const std::vector<DataType> *
operator&()
const {
return &Storage; }
1471 template <
class T>
void addValue(
const T &V) { Storage.push_back(V); }
1480 std::vector<unsigned> Positions;
1483 enum ValueExpected getValueExpectedFlagDefault()
const override {
1484 return Parser.getValueExpectedFlagDefault();
1488 return Parser.getExtraOptionNames(OptionNames);
1491 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1493 typename ParserClass::parser_data_type Val =
1494 typename ParserClass::parser_data_type();
1495 if (Parser.parse(*
this, ArgName, Arg, Val))
1499 Positions.push_back(pos);
1504 size_t getOptionWidth()
const override {
1505 return Parser.getOptionWidth(*
this);
1508 void printOptionInfo(
size_t GlobalWidth)
const override {
1509 Parser.printOptionInfo(*
this, GlobalWidth);
1513 void printOptionValue(
size_t ,
bool )
const override {
1516 void setDefault()
override {}
1520 Parser.initialize();
1526 list &operator=(
const list &) =
delete;
1531 assert(optnum < this->
size() &&
"Invalid option index");
1532 return Positions[optnum];
1537 template <
class... Mods>
1550 template <
typename D,
typename S,
typename P>
1564 unsigned *Location =
nullptr;
1566 template <
class T>
static unsigned Bit(
const T &V) {
1567 unsigned BitPos =
reinterpret_cast<unsigned>(V);
1568 assert(BitPos <
sizeof(
unsigned) * CHAR_BIT &&
1569 "enum exceeds width of bit vector!");
1578 return O.
error(
"cl::location(x) specified more than once!");
1584 assert(Location != 0 &&
"cl::location(...) not specified for a command " 1585 "line option with external storage!");
1586 *Location |=
Bit(V);
1592 return (*Location &
Bit(V)) != 0;
1602 template <
class T>
static unsigned Bit(
const T &V) {
1604 assert(BitPos <
sizeof(
unsigned) * CHAR_BIT &&
1605 "enum exceeds width of bit vector!");
1614 template <
class T>
bool isSet(
const T &V) {
return (Bits &
Bit(V)) != 0; }
1623 std::vector<unsigned> Positions;
1626 enum ValueExpected getValueExpectedFlagDefault()
const override {
1627 return Parser.getValueExpectedFlagDefault();
1631 return Parser.getExtraOptionNames(OptionNames);
1634 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1636 typename ParserClass::parser_data_type Val =
1637 typename ParserClass::parser_data_type();
1638 if (Parser.parse(*
this, ArgName, Arg, Val))
1640 this->addValue(Val);
1642 Positions.push_back(pos);
1647 size_t getOptionWidth()
const override {
1648 return Parser.getOptionWidth(*
this);
1651 void printOptionInfo(
size_t GlobalWidth)
const override {
1652 Parser.printOptionInfo(*
this, GlobalWidth);
1656 void printOptionValue(
size_t ,
bool )
const override {
1659 void setDefault()
override {}
1663 Parser.initialize();
1669 bits &operator=(
const bits &) =
delete;
1674 assert(optnum < this->
size() &&
"Invalid option index");
1675 return Positions[optnum];
1678 template <
class... Mods>
1693 bool handleOccurrence(
unsigned pos,
StringRef ,
1695 return AliasFor->handleOccurrence(pos, AliasFor->
ArgStr, Arg);
1699 bool MultiArg =
false)
override {
1704 size_t getOptionWidth()
const override;
1705 void printOptionInfo(
size_t GlobalWidth)
const override;
1708 void printOptionValue(
size_t ,
bool )
const override {
1711 void setDefault()
override { AliasFor->
setDefault(); }
1713 ValueExpected getValueExpectedFlagDefault()
const override {
1719 error(
"cl::alias must have argument name specified!");
1721 error(
"cl::alias must have an cl::aliasopt(option) specified!");
1722 Subs = AliasFor->
Subs;
1733 error(
"cl::alias must only have one cl::aliasopt(...) specified!");
1737 template <
class... Mods>
1846 bool MarkEOLs =
false);
1861 bool MarkEOLs =
false);
1880 bool MarkEOLs =
false);
1914 bool MarkEOLs =
false,
bool RelativeNames =
false);
1951 #endif // LLVM_SUPPORT_COMMANDLINE_H iterator erase(const_iterator pos)
void addValue(const T &V)
const_reference front() const
bool isPositional() const
void setValue(const T &V, bool initial=false)
void push_back(const T &Elt)
SmallVector< OptionInfo, 8 > Values
void print(const Option &O, const parser< DT > &P, const DT &V, const OptionValue< DT > &Default, size_t GlobalWidth)
ParserClass & getParser()
void ResetCommandLineParser()
Reset the command line parser back to its initial state.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
enum ValueExpected getValueExpectedFlag() const
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
OptionValue< std::string > & operator=(const std::string &V)
OptionCategory GeneralCategory
OptionValue< cl::boolOrDefault > & operator=(const cl::boolOrDefault &V)
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
void push_back(const DataType &value)
bool parse(Option &, StringRef, StringRef Arg, char &Value)
Compute iterated dominance frontiers using a linear time algorithm.
const GenericOptionValue & getOptionValue(unsigned N) const override
OptionValue(const DataType &V)
void apply(Option &O) const
bool compare(const DataType &V) const
bool isConsumeAfter() const
unsigned getNumOptions() const override
void PrintVersionMessage()
Utility function for printing version number.
void print(const Option &O, const parser< ParserDT > &P, const ValDT &, const OptionValue< ValDT > &, size_t GlobalWidth)
void apply(Option &O) const
DataType getValue() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
void setValueStr(StringRef S)
OptionValue< DataType > Default
void setValue(const T &V, bool initial=false)
void ResetAllOptionOccurrences()
Reset all command line options to a state that looks as if they have never appeared on the command li...
void tokenizeConfigFile(StringRef Source, StringSaver &Saver, SmallVectorImpl< const char *> &NewArgv, bool MarkEOLs=false)
Tokenizes content of configuration file.
iterator insert(iterator pos, const DataType &value)
void addValue(const T &V)
const OptionValue< DataType > & getDefault() const
APInt operator &(APInt a, const APInt &b)
void ParseEnvironmentOptions(const char *progName, const char *envvar, const char *Overview="")
ParseEnvironmentOptions - An alternative entry point to the CommandLine library, which allows you to ...
block Block Frequency true
SmallVector< Option *, 4 > SinkOpts
GenericOptionInfo(StringRef name, StringRef helpStr)
bool compare(const GenericOptionValue &V) const override
StringRef getValueName() const override
static void opt(OptionHidden OH, Option &O)
StringMap< Option * > & getRegisteredOptions(SubCommand &Sub= *TopLevelSubCommand)
Use this to get a StringMap to all registered named options (e.g.
bool readConfigFile(StringRef CfgFileName, StringSaver &Saver, SmallVectorImpl< const char *> &Argv)
Reads command line options from the given configuration file.
bool compare(const DataType &) const
bool parse(Option &, StringRef, StringRef Arg, std::string &Value)
StringRef getValueName() const override
Option(enum NumOccurrencesFlag OccurrencesFlag, enum OptionHidden Hidden)
void getExtraOptionNames(SmallVectorImpl< StringRef > &OptionNames)
StringRef getValueName() const override
unsigned getPosition(unsigned optnum) const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
void setNumAdditionalVals(unsigned n)
OptionValue< DataType > WrapperType
ParserClass & getParser()
void printOptionDiff(const Option &O, const generic_parser_base &P, const DT &V, const OptionValue< DT > &Default, size_t GlobalWidth)
void apply(Opt *O, const Mod &M, const Mods &... Ms)
void push_back(DataType &&value)
OptionValue< DataType > V
void TokenizeWindowsCommandLine(StringRef Source, StringSaver &Saver, SmallVectorImpl< const char *> &NewArgv, bool MarkEOLs=false)
Tokenizes a Windows command line which may contain quotes and escaped quotes.
Position
Position to insert a new instruction relative to an existing instruction.
void getExtraOptionNames(SmallVectorImpl< StringRef > &)
StringRef getDescription() const
virtual bool addOccurrence(unsigned pos, StringRef ArgName, StringRef Value, bool MultiArg=false)
static void opt(StringRef Str, Opt &O)
OptionValue(const cl::boolOrDefault &V)
StringRef getValueName() const override
std::function< void(raw_ostream &)> VersionPrinterTy
SmallVector< Option *, 4 > PositionalOpts
StringRef getValueName() const override
iterator erase(iterator first, iterator last)
StringRef getValueName() const override
typename std::vector< DataType >::size_type size_type
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
StringRef getValueName() const override
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
iterator insert(iterator pos, DataType &&value)
StringRef getName() const
DataType operator->() const
ParserClass & getParser()
reference operator[](size_type pos)
ManagedStatic< SubCommand > AllSubCommands
bool setLocation(Option &O, DataType &L)
StringMap< Option * > OptionsMap
ManagedStatic< SubCommand > TopLevelSubCommand
void HideUnrelatedOptions(cl::OptionCategory &Category, SubCommand &Sub= *TopLevelSubCommand)
Mark all options not part of this category as cl::ReallyHidden.
static void opt(const Mod &M, Opt &O)
const DataType & getValue() const
const DataType & getValue() const
initializer< Ty > init(const Ty &Val)
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
bool parse(Option &O, StringRef ArgName, StringRef Arg, DataType &V)
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
void setNumOccurrencesFlag(enum NumOccurrencesFlag Val)
SubCommand(StringRef Name, StringRef Description="")
unsigned getNumAdditionalVals() const
void PrintHelpMessage(bool Hidden=false, bool Categorized=false)
This function just prints the help message, exactly the same way as if the -help or -help-hidden opti...
value_desc(StringRef Str)
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
typename std::vector< DataType >::iterator iterator
bool setLocation(Option &O, StorageClass &L)
int getNumOccurrences() const
void setHiddenFlag(enum OptionHidden Val)
typename std::vector< DataType >::reference reference
bool any_of(R &&Range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly...
OptionCategory * Category
const OptionValue< DataType > & getDefault() const
void SetVersionPrinter(VersionPrinterTy func)
===------------------------------------------------------------------—===// SetVersionPrinter - Over...
StringRef getDescription() const
void addValue(const T &V)
void setPosition(unsigned pos)
llvm::Expected< Value > parse(llvm::StringRef JSON)
Parses the provided JSON source, or returns a ParseError.
bool isInAllSubCommands() const
void setValue(const DataType &V)
bool ParseCommandLineOptions(int argc, const char *const *argv, StringRef Overview="", raw_ostream *Errs=nullptr)
PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method.
iterator erase(const_iterator CI)
Value(Type *Ty, unsigned scid)
void setCategory(OptionCategory &C)
iterator insert(const_iterator pos, DataType &&value)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool setLocation(Option &O, unsigned &L)
void removeLiteralOption(StringRef Name)
removeLiteralOption - Remove the specified option.
const_iterator end() const
generic_parser_base(Option &O)
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
void setFormattingFlag(enum FormattingFlags V)
OptionValue(const std::string &V)
void setInitialValue(const DataType &V)
void setValueExpectedFlag(enum ValueExpected Val)
void TokenizeGNUCommandLine(StringRef Source, StringSaver &Saver, SmallVectorImpl< const char *> &NewArgv, bool MarkEOLs=false)
Tokenizes a command line that can contain escapes and quotes.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
const DataType & getValue() const
void apply(list< D, S, P > &L) const
void setDescription(StringRef S)
static ManagedStatic< CodeViewErrorCategory > Category
StringRef getValueName() const override
basic_parser_impl(Option &)
void setValue(const T &V, bool initial=false)
unsigned getPosition() const
bool error(const Twine &Message, raw_ostream &Errs)
CHAIN = SC CHAIN, Imm128 - System call.
void setAliasFor(Option &O)
OptionInfo(StringRef name, DataType v, StringRef helpStr)
void setNumAdditionalVals(unsigned n)
virtual void setDefault()=0
void printOptionDiff(const Option &O, const AnyOptionValue &V, const AnyOptionValue &Default, size_t GlobalWidth) const
The access may modify the value stored in memory.
A range adaptor for a pair of iterators.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
const DataType & getValue() const
const_iterator begin() const
void AddLiteralOption(Option &O, StringRef Name)
Adds a new option for parsing and provides the option it refers to.
void addLiteralOption(StringRef Name, const DT &V, StringRef HelpStr)
addLiteralOption - Add an entry to the mapping table.
amdgpu Simplify well known AMD library false Value Value * Arg
ValuesClass(std::initializer_list< OptionEnumValue > Options)
static void opt(StringRef Str, Opt &O)
iterator erase(const_iterator first, const_iterator last)
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer...
StringRef getValueName() const override
void(*)(StringRef Source, StringSaver &Saver, SmallVectorImpl< const char * > &NewArgv, bool MarkEOLs) TokenizerCallback
String tokenization function type.
static void opt(MiscFlags MF, Option &O)
virtual void getExtraOptionNames(SmallVectorImpl< StringRef > &)
void setMiscFlag(enum MiscFlags M)
OptionCategory(StringRef const Name, StringRef const Description="")
static void opt(ValueExpected VE, Option &O)
SmallPtrSet< SubCommand *, 4 > Subs
bool error(const Twine &Message, StringRef ArgName=StringRef(), raw_ostream &Errs=llvm::errs())
void setValue(const DT &)
bool compare(const GenericOptionValue &) const override
DataType & operator=(const T &Val)
iterator erase(iterator pos)
iterator insert(const_iterator pos, const DataType &value)
typename std::vector< DataType >::const_iterator const_iterator
typename std::vector< DataType >::const_reference const_reference
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale)
Compare two scaled numbers.
const_reference operator[](size_type pos) const
static void opt(NumOccurrencesFlag N, Option &O)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const OptionValue< DataType > & getDefault() const
LLVM Value Representation.
StringRef getOption(unsigned N) const override
void AddExtraVersionPrinter(VersionPrinterTy func)
===------------------------------------------------------------------—===// AddExtraVersionPrinter -...
StringRef getDescription(unsigned N) const override
OptionValue< DataType > & operator=(const DT &V)
This class implements an extremely fast bulk output stream that can only output to a stream...
void addSubCommand(SubCommand &S)
bool ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer, SmallVectorImpl< const char *> &Argv, bool MarkEOLs=false, bool RelativeNames=false)
Expand response files on a command line recursively using the given StringSaver and tokenization stra...
unsigned getMiscFlags() const
StringRef - Represent a constant reference to a string, i.e.
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
static void opt(StringRef Str, Opt &O)
iterator_range< typename SmallPtrSet< SubCommand *, 4 >::iterator > getRegisteredSubcommands()
Use this to get all registered SubCommands from the provided parser.
void addValue(const T &V)
void apply(alias &A) const
OptionValue< DataType > Default
LocationClass< Ty > location(Ty &L)
StringRef getName() const
alias(const Mods &... Ms)
initializer(const Ty &Val)
virtual StringRef getValueName() const
unsigned getPosition(unsigned optnum) const
OptionCategory & Category