Lines Matching refs:Option

68 void Option::anchor() {}
105 static Option *RegisteredOptionList = nullptr;
107 void Option::addArgument() {
115 void Option::removeArgument() {
145 static void GetOptionInfo(SmallVectorImpl<Option*> &PositionalOpts,
146 SmallVectorImpl<Option*> &SinkOpts,
147 StringMap<Option*> &OptionsMap) {
150 Option *CAOpt = nullptr; // The ConsumeAfter option if it exists.
151 for (Option *O = RegisteredOptionList; O; O = O->getNextRegisteredOption()) {
162 errs() << ProgramName << ": CommandLine Error: Option '"
201 static Option *LookupOption(StringRef &Arg, StringRef &Value,
202 const StringMap<Option*> &OptionsMap) {
211 StringMap<Option*>::const_iterator I = OptionsMap.find(Arg);
217 StringMap<Option*>::const_iterator I =
230 static Option *LookupNearestOption(StringRef Arg,
231 const StringMap<Option*> &OptionsMap,
242 Option *Best = nullptr;
244 for (StringMap<Option*>::const_iterator it = OptionsMap.begin(),
246 Option *O = it->second;
274 static bool CommaSeparateAndAddOccurrence(Option *Handler, unsigned pos,
306 static inline bool ProvideOption(Option *Handler, StringRef ArgName,
362 static bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i) {
368 // Option predicates...
369 static inline bool isGrouping(const Option *O) {
372 static inline bool isPrefixedOrGrouping(const Option *O) {
382 static Option *getOptionPred(StringRef Name, size_t &Length,
383 bool (*Pred)(const Option*),
384 const StringMap<Option*> &OptionsMap) {
386 StringMap<Option*>::const_iterator OMI = OptionsMap.find(Name);
406 /// Arg/Value pair and return the Option to parse it with.
407 static Option *HandlePrefixedOrGroupedOption(StringRef &Arg, StringRef &Value,
409 const StringMap<Option*> &OptionsMap) {
414 Option *PGOpt = getOptionPred(Arg, Length, isPrefixedOrGrouping, OptionsMap);
439 "Option can not be cl::Grouping AND cl::ValueRequired!");
454 static bool RequiresValue(const Option *O) {
459 static bool EatsUnboundedNumberOfValues(const Option *O) {
745 SmallVector<Option*, 4> PositionalOpts;
746 SmallVector<Option*, 4> SinkOpts;
747 StringMap<Option*> Opts;
777 Option *ConsumeAfterOpt = nullptr;
789 Option *Opt = PositionalOpts[i];
823 Option *ActivePositionalArg = nullptr;
828 Option *Handler = nullptr;
829 Option *NearestHandler = nullptr;
924 for (SmallVectorImpl<Option*>::iterator I = SinkOpts.begin(),
1021 for (StringMap<Option*>::iterator I = Opts.begin(),
1056 // Option Base class implementation
1059 bool Option::error(const Twine &Message, StringRef ArgName) {
1070 bool Option::addOccurrence(unsigned pos, StringRef ArgName,
1096 static const char *getValueStr(const Option &O, const char *DefaultMsg) {
1134 size_t basic_parser_impl::getOptionWidth(const Option &O) const {
1145 void basic_parser_impl::printOptionInfo(const Option &O,
1155 void basic_parser_impl::printOptionName(const Option &O,
1164 bool parser<bool>::parse(Option &O, StringRef ArgName,
1182 bool parser<boolOrDefault>::parse(Option &O, StringRef ArgName,
1200 bool parser<int>::parse(Option &O, StringRef ArgName,
1209 bool parser<unsigned>::parse(Option &O, StringRef ArgName,
1219 bool parser<unsigned long long>::parse(Option &O, StringRef ArgName,
1229 static bool parseDouble(Option &O, StringRef Arg, double &Value) {
1239 bool parser<double>::parse(Option &O, StringRef ArgName,
1244 bool parser<float>::parse(Option &O, StringRef ArgName,
1273 size_t generic_parser_base::getOptionWidth(const Option &O) const {
1290 void generic_parser_base::printOptionInfo(const Option &O,
1305 const char *Option = getOption(i);
1306 outs() << " -" << Option;
1307 printHelpStr(getDescription(i), GlobalWidth, std::strlen(Option) + 8);
1318 printGenericOptionDiff(const Option &O, const GenericOptionValue &Value,
1349 printOptionDiff(const Option &O, T V, OptionValue<T> D, \
1377 printOptionDiff(const Option &O, StringRef V, OptionValue<std::string> D,
1392 printOptionNoValue(const Option &O, size_t GlobalWidth) const {
1402 typedef std::pair<const char *, Option*> pair_ty;
1409 sortOpts(StringMap<Option*> &OptMap,
1410 SmallVectorImpl< std::pair<const char *, Option*> > &Opts,
1412 SmallPtrSet<Option*, 128> OptionSet; // Duplicate option detection.
1414 for (StringMap<Option*>::iterator I = OptMap.begin(), E = OptMap.end();
1428 Opts.push_back(std::pair<const char *, Option*>(I->getKey().data(),
1441 typedef SmallVector<std::pair<const char *, Option*>,128> StrOptionPairVector;
1457 SmallVector<Option*, 4> PositionalOpts;
1458 SmallVector<Option*, 4> SinkOpts;
1459 StringMap<Option*> OptMap;
1471 Option *CAOpt = nullptr; // The cl::ConsumeAfter option, if it exists...
1524 std::map<OptionCategory *, std::vector<Option *> > CategorizedOptions;
1544 CategorizedOptions[*I] = std::vector<Option *>();
1550 Option *Opt = Opts[I].second;
1552 "Option has an unregistered category");
1583 for (std::vector<Option *>::const_iterator
1627 // -help-list is hidden by default because if Option categories are being used
1640 // behaviour at runtime depending on whether one or more Option categories have
1685 SmallVector<Option*, 4> PositionalOpts;
1686 SmallVector<Option*, 4> SinkOpts;
1687 StringMap<Option*> OptMap;
1690 SmallVector<std::pair<const char *, Option*>, 128> Opts;
1801 void cl::getRegisteredOptions(StringMap<Option*> &Map)
1804 SmallVector<Option*, 4> PositionalOpts; //NOT USED
1805 SmallVector<Option*, 4> SinkOpts; //NOT USED