20 #ifndef LLVM_SUPPORT_COMMANDLINE_H 21 #define LLVM_SUPPORT_COMMANDLINE_H 38 #include <initializer_list> 40 #include <type_traits> 70 const char *EnvVar =
nullptr);
77 const char *Overview =
"");
189 void registerCategory();
194 : Name(Name), Description(Description) {
214 void registerSubCommand();
215 void unregisterSubCommand();
219 : Name(Name), Description(Description) {
220 registerSubCommand();
226 explicit operator bool()
const;
254 virtual bool handleOccurrence(
unsigned pos,
StringRef ArgName,
257 virtual enum ValueExpected getValueExpectedFlagDefault()
const {
262 virtual void anchor();
264 int NumOccurrences = 0;
267 unsigned Occurrences : 3;
271 unsigned HiddenFlag : 2;
272 unsigned Formatting : 3;
275 unsigned AdditionalVals = 0;
283 bool FullyInitialized =
false;
338 : Occurrences(OccurrencesFlag),
Value(0), HiddenFlag(Hidden),
344 virtual ~
Option() =
default;
354 void removeArgument();
357 virtual size_t getOptionWidth()
const = 0;
362 virtual void printOptionInfo(
size_t GlobalWidth)
const = 0;
364 virtual void printOptionValue(
size_t GlobalWidth,
bool Force)
const = 0;
366 virtual void setDefault() = 0;
369 size_t FirstLineIndentedBy);
376 bool MultiArg =
false);
385 inline void reset() { NumOccurrences = 0; }
420 template <
class Opt>
void apply(Opt &
O)
const { O.setInitialValue(Init); }
436 template <
class Opt>
void apply(Opt &
O)
const { O.setLocation(O, Loc); }
450 template <
class Opt>
void apply(Opt &
O)
const { O.setCategory(Category); }
459 template <
class Opt>
void apply(Opt &
O)
const { O.addSubCommand(Sub); }
476 virtual void anchor();
483 template <
class DataType,
bool isClass>
521 assert(Valid &&
"invalid option value");
542 template <
class DataType>
554 template <
class DataType>
585 void anchor()
override;
602 void anchor()
override;
616 #define clEnumVal(ENUMVAL, DESC) \ 617 llvm::cl::OptionEnumValue { #ENUMVAL, int(ENUMVAL), DESC } 618 #define clEnumValN(ENUMVAL, FLAGNAME, DESC) \ 619 llvm::cl::OptionEnumValue { FLAGNAME, int(ENUMVAL), DESC } 634 template <
class Opt>
void apply(Opt &
O)
const {
635 for (
auto Value : Values)
664 : Name(name), HelpStr(helpStr) {}
678 virtual unsigned getNumOptions()
const = 0;
681 virtual StringRef getOption(
unsigned N)
const = 0;
687 virtual size_t getOptionWidth(
const Option &
O)
const;
694 virtual void printOptionInfo(
const Option &O,
size_t GlobalWidth)
const;
698 size_t GlobalWidth)
const;
704 template <
class AnyOptionValue>
706 const AnyOptionValue &Default,
707 size_t GlobalWidth)
const {
708 printGenericOptionDiff(O, V, Default, GlobalWidth);
717 if (!Owner.hasArgStr())
718 for (
unsigned i = 0, e = getNumOptions(); i != e; ++i)
734 if (Owner.hasArgStr())
775 return Values[
N].HelpStr;
786 if (Owner.hasArgStr())
791 for (
size_t i = 0, e = Values.
size(); i != e; ++i)
792 if (Values[i].Name == ArgVal) {
793 V = Values[i].V.getValue();
797 return O.
error(
"Cannot find option named '" + ArgVal +
"'!");
804 assert(findOption(Name) == Values.
size() &&
"Option already exists!");
805 OptionInfo
X(Name, static_cast<DataType>(V), HelpStr);
813 unsigned N = findOption(Name);
814 assert(N != Values.
size() &&
"Option not found!");
835 size_t getOptionWidth(
const Option &
O)
const;
840 void printOptionInfo(
const Option &O,
size_t GlobalWidth)
const;
844 void printOptionNoValue(
const Option &O,
size_t GlobalWidth)
const;
850 virtual void anchor();
856 void printOptionName(
const Option &O,
size_t GlobalWidth)
const;
893 size_t GlobalWidth)
const;
896 void anchor()
override;
919 size_t GlobalWidth)
const;
922 void anchor()
override;
941 size_t GlobalWidth)
const;
944 void anchor()
override;
963 size_t GlobalWidth)
const;
966 void anchor()
override;
982 unsigned long long &Val);
988 size_t GlobalWidth)
const;
991 void anchor()
override;
1010 size_t GlobalWidth)
const;
1013 void anchor()
override;
1032 size_t GlobalWidth)
const;
1035 void anchor()
override;
1057 size_t GlobalWidth)
const;
1060 void anchor()
override;
1082 size_t GlobalWidth)
const;
1085 void anchor()
override;
1097 template <
class ParserClass,
class DT>
1109 P.printOptionNoValue(O, GlobalWidth);
1124 template <
class ParserClass,
class ValDT>
1131 printer.
print(O, static_cast<const ParserClass &>(P), V, Default,
1142 template <
class Opt>
static void opt(
const Mod &M, Opt &
O) { M.apply(O); }
1185 template <
class Opt,
class Mod,
class... Mods>
1186 void apply(Opt *
O,
const Mod &M,
const Mods &... Ms) {
1191 template <
class Opt,
class Mod>
void apply(Opt *
O,
const Mod &M) {
1202 template <
class DataType,
bool ExternalStorage,
bool isClass>
1207 void check_location()
const {
1208 assert(Location &&
"cl::location(...) not specified for a command " 1209 "line option with external storage, " 1210 "or cl::init specified before cl::location()!!");
1218 return O.
error(
"cl::location(x) specified more than once!");
1224 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1249 template <
class DataType>
1254 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1255 DataType::operator=(V);
1279 template <
class T>
void setValue(
const T &V,
bool initial =
false) {
1298 template <
class DataType,
bool ExternalStorage =
false,
1302 std::is_class<DataType>::value> {
1305 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1307 typename ParserClass::parser_data_type Val =
1308 typename ParserClass::parser_data_type();
1309 if (Parser.parse(*
this, ArgName, Arg, Val))
1311 this->setValue(Val);
1312 this->setPosition(pos);
1316 enum ValueExpected getValueExpectedFlagDefault()
const override {
1317 return Parser.getValueExpectedFlagDefault();
1321 return Parser.getExtraOptionNames(OptionNames);
1325 size_t getOptionWidth()
const override {
1326 return Parser.getOptionWidth(*
this);
1329 void printOptionInfo(
size_t GlobalWidth)
const override {
1330 Parser.printOptionInfo(*
this, GlobalWidth);
1333 void printOptionValue(
size_t GlobalWidth,
bool Force)
const override {
1334 if (Force || this->getDefault().
compare(this->getValue())) {
1335 cl::printOptionDiff<ParserClass>(*
this, Parser, this->getValue(),
1336 this->getDefault(), GlobalWidth);
1340 template <
class T,
class =
typename std::enable_if<
1341 std::is_assignable<T&, T>::value>
::type>
1342 void setDefaultImpl() {
1348 template <
class T,
class =
typename std::enable_if<
1349 !std::is_assignable<T&, T>::value>
::type>
1350 void setDefaultImpl(...) {}
1352 void setDefault()
override { setDefaultImpl<DataType>(); }
1356 Parser.initialize();
1361 opt(
const opt &) =
delete;
1362 opt &operator=(
const opt &) =
delete;
1370 this->setValue(Val);
1371 return this->getValue();
1374 template <
class... Mods>
1375 explicit opt(
const Mods &... Ms)
1403 return O.
error(
"cl::location(x) specified more than once!");
1409 assert(Location != 0 &&
"cl::location(...) not specified for a command " 1410 "line option with external storage!");
1411 Location->push_back(V);
1424 std::vector<DataType> Storage;
1427 using iterator =
typename std::vector<DataType>::iterator;
1437 using size_type =
typename std::vector<DataType>::size_type;
1441 bool empty()
const {
return Storage.empty(); }
1446 using reference =
typename std::vector<DataType>::reference;
1454 return Storage.erase(first, last);
1459 return Storage.erase(first, last);
1463 return Storage.insert(pos, value);
1466 return Storage.insert(pos, value);
1470 return Storage.insert(pos, value);
1473 return Storage.insert(pos, value);
1479 operator std::vector<DataType>&() {
return Storage; }
1482 const std::vector<DataType> *
operator&()
const {
return &Storage; }
1484 template <
class T>
void addValue(
const T &V) { Storage.push_back(V); }
1493 std::vector<unsigned> Positions;
1496 enum ValueExpected getValueExpectedFlagDefault()
const override {
1497 return Parser.getValueExpectedFlagDefault();
1501 return Parser.getExtraOptionNames(OptionNames);
1504 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1506 typename ParserClass::parser_data_type Val =
1507 typename ParserClass::parser_data_type();
1508 if (Parser.parse(*
this, ArgName, Arg, Val))
1512 Positions.push_back(pos);
1517 size_t getOptionWidth()
const override {
1518 return Parser.getOptionWidth(*
this);
1521 void printOptionInfo(
size_t GlobalWidth)
const override {
1522 Parser.printOptionInfo(*
this, GlobalWidth);
1526 void printOptionValue(
size_t ,
bool )
const override {
1529 void setDefault()
override {}
1533 Parser.initialize();
1539 list &operator=(
const list &) =
delete;
1544 assert(optnum < this->
size() &&
"Invalid option index");
1545 return Positions[optnum];
1550 template <
class... Mods>
1563 template <
typename D,
typename S,
typename P>
1577 unsigned *Location =
nullptr;
1579 template <
class T>
static unsigned Bit(
const T &V) {
1580 unsigned BitPos =
reinterpret_cast<unsigned>(V);
1581 assert(BitPos <
sizeof(
unsigned) * CHAR_BIT &&
1582 "enum exceeds width of bit vector!");
1591 return O.
error(
"cl::location(x) specified more than once!");
1597 assert(Location != 0 &&
"cl::location(...) not specified for a command " 1598 "line option with external storage!");
1599 *Location |=
Bit(V);
1605 return (*Location &
Bit(V)) != 0;
1615 template <
class T>
static unsigned Bit(
const T &V) {
1617 assert(BitPos <
sizeof(
unsigned) * CHAR_BIT &&
1618 "enum exceeds width of bit vector!");
1627 template <
class T>
bool isSet(
const T &V) {
return (Bits &
Bit(V)) != 0; }
1636 std::vector<unsigned> Positions;
1639 enum ValueExpected getValueExpectedFlagDefault()
const override {
1640 return Parser.getValueExpectedFlagDefault();
1644 return Parser.getExtraOptionNames(OptionNames);
1647 bool handleOccurrence(
unsigned pos,
StringRef ArgName,
1649 typename ParserClass::parser_data_type Val =
1650 typename ParserClass::parser_data_type();
1651 if (Parser.parse(*
this, ArgName, Arg, Val))
1653 this->addValue(Val);
1655 Positions.push_back(pos);
1660 size_t getOptionWidth()
const override {
1661 return Parser.getOptionWidth(*
this);
1664 void printOptionInfo(
size_t GlobalWidth)
const override {
1665 Parser.printOptionInfo(*
this, GlobalWidth);
1669 void printOptionValue(
size_t ,
bool )
const override {
1672 void setDefault()
override {}
1676 Parser.initialize();
1682 bits &operator=(
const bits &) =
delete;
1687 assert(optnum < this->
size() &&
"Invalid option index");
1688 return Positions[optnum];
1691 template <
class... Mods>
1706 bool handleOccurrence(
unsigned pos,
StringRef ,
1708 return AliasFor->handleOccurrence(pos, AliasFor->
ArgStr, Arg);
1712 bool MultiArg =
false)
override {
1717 size_t getOptionWidth()
const override;
1718 void printOptionInfo(
size_t GlobalWidth)
const override;
1721 void printOptionValue(
size_t ,
bool )
const override {
1724 void setDefault()
override { AliasFor->
setDefault(); }
1726 ValueExpected getValueExpectedFlagDefault()
const override {
1732 error(
"cl::alias must have argument name specified!");
1734 error(
"cl::alias must have an cl::aliasopt(option) specified!");
1735 Subs = AliasFor->
Subs;
1746 error(
"cl::alias must only have one cl::aliasopt(...) specified!");
1750 template <
class... Mods>
1859 bool MarkEOLs =
false);
1874 bool MarkEOLs =
false);
1893 bool MarkEOLs =
false);
1927 bool MarkEOLs =
false,
bool RelativeNames =
false);
1964 #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)
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)
This class represents lattice values for constants.
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 push_back(const T &Elt)
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
COFF::SymbolStorageClass StorageClass
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)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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
bool ParseCommandLineOptions(int argc, const char *const *argv, StringRef Overview="", raw_ostream *Errs=nullptr, const char *EnvVar=nullptr)
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)
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)
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