Lines Matching refs:Option

67 void Option::anchor() {}
104 static Option *RegisteredOptionList = 0;
106 void Option::addArgument() {
132 static void GetOptionInfo(SmallVectorImpl<Option*> &PositionalOpts,
133 SmallVectorImpl<Option*> &SinkOpts,
134 StringMap<Option*> &OptionsMap) {
136 Option *CAOpt = 0; // The ConsumeAfter option if it exists.
137 for (Option *O = RegisteredOptionList; O; O = O->getNextRegisteredOption()) {
178 static Option *LookupOption(StringRef &Arg, StringRef &Value,
179 const StringMap<Option*> &OptionsMap) {
188 StringMap<Option*>::const_iterator I = OptionsMap.find(Arg);
194 StringMap<Option*>::const_iterator I =
207 static Option *LookupNearestOption(StringRef Arg,
208 const StringMap<Option*> &OptionsMap,
219 Option *Best = 0;
221 for (StringMap<Option*>::const_iterator it = OptionsMap.begin(),
223 Option *O = it->second;
251 static bool CommaSeparateAndAddOccurence(Option *Handler, unsigned pos,
284 static inline bool ProvideOption(Option *Handler, StringRef ArgName,
340 static bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i) {
346 // Option predicates...
347 static inline bool isGrouping(const Option *O) {
350 static inline bool isPrefixedOrGrouping(const Option *O) {
360 static Option *getOptionPred(StringRef Name, size_t &Length,
361 bool (*Pred)(const Option*),
362 const StringMap<Option*> &OptionsMap) {
364 StringMap<Option*>::const_iterator OMI = OptionsMap.find(Name);
384 /// Arg/Value pair and return the Option to parse it with.
385 static Option *HandlePrefixedOrGroupedOption(StringRef &Arg, StringRef &Value,
387 const StringMap<Option*> &OptionsMap) {
392 Option *PGOpt = getOptionPred(Arg, Length, isPrefixedOrGrouping, OptionsMap);
417 "Option can not be cl::Grouping AND cl::ValueRequired!");
432 static bool RequiresValue(const Option *O) {
437 static bool EatsUnboundedNumberOfValues(const Option *O) {
718 SmallVector<Option*, 4> PositionalOpts;
719 SmallVector<Option*, 4> SinkOpts;
720 StringMap<Option*> Opts;
750 Option *ConsumeAfterOpt = 0;
762 Option *Opt = PositionalOpts[i];
796 Option *ActivePositionalArg = 0;
801 Option *Handler = 0;
802 Option *NearestHandler = 0;
898 for (SmallVectorImpl<Option*>::iterator I = SinkOpts.begin(),
995 for (StringMap<Option*>::iterator I = Opts.begin(),
1030 // Option Base class implementation
1033 bool Option::error(const Twine &Message, StringRef ArgName) {
1044 bool Option::addOccurrence(unsigned pos, StringRef ArgName,
1070 static const char *getValueStr(const Option &O, const char *DefaultMsg) {
1108 size_t basic_parser_impl::getOptionWidth(const Option &O) const {
1119 void basic_parser_impl::printOptionInfo(const Option &O,
1129 void basic_parser_impl::printOptionName(const Option &O,
1138 bool parser<bool>::parse(Option &O, StringRef ArgName,
1156 bool parser<boolOrDefault>::parse(Option &O, StringRef ArgName,
1174 bool parser<int>::parse(Option &O, StringRef ArgName,
1183 bool parser<unsigned>::parse(Option &O, StringRef ArgName,
1193 bool parser<unsigned long long>::parse(Option &O, StringRef ArgName,
1203 static bool parseDouble(Option &O, StringRef Arg, double &Value) {
1213 bool parser<double>::parse(Option &O, StringRef ArgName,
1218 bool parser<float>::parse(Option &O, StringRef ArgName,
1247 size_t generic_parser_base::getOptionWidth(const Option &O) const {
1264 void generic_parser_base::printOptionInfo(const Option &O,
1279 const char *Option = getOption(i);
1280 outs() << " -" << Option;
1281 printHelpStr(getDescription(i), GlobalWidth, std::strlen(Option) + 8);
1292 printGenericOptionDiff(const Option &O, const GenericOptionValue &Value,
1323 printOptionDiff(const Option &O, T V, OptionValue<T> D, \
1351 printOptionDiff(const Option &O, StringRef V, OptionValue<std::string> D,
1366 printOptionNoValue(const Option &O, size_t GlobalWidth) const {
1376 typedef std::pair<const char *, Option*> pair_ty;
1383 sortOpts(StringMap<Option*> &OptMap,
1384 SmallVectorImpl< std::pair<const char *, Option*> > &Opts,
1386 SmallPtrSet<Option*, 128> OptionSet; // Duplicate option detection.
1388 for (StringMap<Option*>::iterator I = OptMap.begin(), E = OptMap.end();
1402 Opts.push_back(std::pair<const char *, Option*>(I->getKey().data(),
1415 typedef SmallVector<std::pair<const char *, Option*>,128> StrOptionPairVector;
1431 SmallVector<Option*, 4> PositionalOpts;
1432 SmallVector<Option*, 4> SinkOpts;
1433 StringMap<Option*> OptMap;
1445 Option *CAOpt = 0; // The cl::ConsumeAfter option, if it exists...
1500 std::map<OptionCategory *, std::vector<Option *> > CategorizedOptions;
1519 CategorizedOptions[*I] = std::vector<Option *>();
1525 Option *Opt = Opts[I].second;
1527 "Option has an unregistered category");
1558 for (std::vector<Option *>::const_iterator
1602 // -help-list is hidden by default because if Option categories are being used
1615 // behaviour at runtime depending on whether one or more Option categories have
1660 SmallVector<Option*, 4> PositionalOpts;
1661 SmallVector<Option*, 4> SinkOpts;
1662 StringMap<Option*> OptMap;
1665 SmallVector<std::pair<const char *, Option*>, 128> Opts;
1776 void cl::getRegisteredOptions(StringMap<Option*> &Map)
1779 SmallVector<Option*, 4> PositionalOpts; //NOT USED
1780 SmallVector<Option*, 4> SinkOpts; //NOT USED