Lines Matching refs:Arg

208   Option *LookupOption(StringRef &Arg, StringRef &Value);
250 Option *CommandLineParser::LookupOption(StringRef &Arg, StringRef &Value) { in LookupOption() argument
252 if (Arg.empty()) in LookupOption()
255 size_t EqualPos = Arg.find('='); in LookupOption()
260 StringMap<Option *>::const_iterator I = OptionsMap.find(Arg); in LookupOption()
267 OptionsMap.find(Arg.substr(0, EqualPos)); in LookupOption()
271 Value = Arg.substr(EqualPos + 1); in LookupOption()
272 Arg = Arg.substr(0, EqualPos); in LookupOption()
280 static Option *LookupNearestOption(StringRef Arg, in LookupNearestOption() argument
284 if (Arg.empty()) in LookupNearestOption()
288 std::pair<StringRef, StringRef> SplitArg = Arg.split('='); in LookupNearestOption()
305 StringRef Flag = PermitValue ? LHS : Arg; in LookupNearestOption()
416 static bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i) { in ProvidePositionalOption() argument
418 return ProvideOption(Handler, Handler->ArgStr, Arg, 0, nullptr, Dummy); in ProvidePositionalOption()
461 HandlePrefixedOrGroupedOption(StringRef &Arg, StringRef &Value, in HandlePrefixedOrGroupedOption() argument
464 if (Arg.size() == 1) in HandlePrefixedOrGroupedOption()
469 Option *PGOpt = getOptionPred(Arg, Length, isPrefixedOrGrouping, OptionsMap); in HandlePrefixedOrGroupedOption()
477 Value = Arg.substr(Length); in HandlePrefixedOrGroupedOption()
478 Arg = Arg.substr(0, Length); in HandlePrefixedOrGroupedOption()
479 assert(OptionsMap.count(Arg) && OptionsMap.find(Arg)->second == PGOpt); in HandlePrefixedOrGroupedOption()
489 StringRef OneArgName = Arg.substr(0, Length); in HandlePrefixedOrGroupedOption()
490 Arg = Arg.substr(Length); in HandlePrefixedOrGroupedOption()
501 PGOpt = getOptionPred(Arg, Length, isGrouping, OptionsMap); in HandlePrefixedOrGroupedOption()
502 } while (PGOpt && Length != Arg.size()); in HandlePrefixedOrGroupedOption()
747 const char *Arg = Argv[I]; in ExpandResponseFiles() local
749 if (Arg == nullptr) { in ExpandResponseFiles()
753 if (Arg[0] != '@') { in ExpandResponseFiles()
768 if (!ExpandResponseFile(Arg + 1, Saver, Tokenizer, ExpandedArgv, in ExpandResponseFiles()
1231 bool parser<bool>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1233 if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" || in parse()
1234 Arg == "1") { in parse()
1239 if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") { in parse()
1243 return O.error("'" + Arg + in parse()
1249 bool parser<boolOrDefault>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1251 if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" || in parse()
1252 Arg == "1") { in parse()
1256 if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") { in parse()
1261 return O.error("'" + Arg + in parse()
1267 bool parser<int>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1269 if (Arg.getAsInteger(0, Value)) in parse()
1270 return O.error("'" + Arg + "' value invalid for integer argument!"); in parse()
1276 bool parser<unsigned>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1279 if (Arg.getAsInteger(0, Value)) in parse()
1280 return O.error("'" + Arg + "' value invalid for uint argument!"); in parse()
1287 StringRef Arg, in parse()
1290 if (Arg.getAsInteger(0, Value)) in parse()
1291 return O.error("'" + Arg + "' value invalid for uint argument!"); in parse()
1297 static bool parseDouble(Option &O, StringRef Arg, double &Value) { in parseDouble() argument
1298 SmallString<32> TmpStr(Arg.begin(), Arg.end()); in parseDouble()
1303 return O.error("'" + Arg + "' value invalid for floating point argument!"); in parseDouble()
1307 bool parser<double>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1309 return parseDouble(O, Arg, Val); in parse()
1312 bool parser<float>::parse(Option &O, StringRef ArgName, StringRef Arg, in parse() argument
1315 if (parseDouble(O, Arg, dVal)) in parse()