Lines Matching refs:Value
208 Option *LookupOption(StringRef &Arg, StringRef &Value);
248 /// command line. If there is a value specified (after an equal sign) return
250 Option *CommandLineParser::LookupOption(StringRef &Arg, StringRef &Value) {
257 // If we have an equals sign, remember the value.
271 Value = Arg.substr(EqualPos + 1);
277 /// the specified option on the command line. If there is a value specified
326 StringRef ArgName, StringRef Value,
329 // it does, we have to split up the value into multiple values.
331 StringRef Val(Value);
340 Value.substr(Pos + 1); // Increment the original value pointer as well.
345 Value = Val;
348 if (Handler->addOccurrence(pos, ArgName, Value, MultiArg))
354 /// ProvideOption - For Value, this differentiates between an empty value ("")
355 /// and a null value (StringRef()). The later is accepted for arguments that
356 /// don't allow a value (-foo) the former is rejected (-foo=).
358 StringRef Value, int argc,
363 // Enforce value requirements
366 if (!Value.data()) { // No value specified?
368 return Handler->error("requires a value!");
371 Value = argv[++i];
379 if (Value.data())
380 return Handler->error("does not allow a value! '" + Twine(Value) +
389 return CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value);
394 if (Value.data()) {
395 if (CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value, MultiArg))
405 Value = argv[++i];
407 if (CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value, MultiArg))
458 /// Arg/Value pair and return the Option to parse it with.
460 HandlePrefixedOrGroupedOption(StringRef &Arg, StringRef &Value,
472 // If the option is a prefixed option, then the value is simply the
474 // setting up the argument name flags and value fields.
476 Value = Arg.substr(Length);
804 // Parse the value of the environment variable into a "command line"
859 "because it does not Require a value, and a "
862 // This option does not "require" a value... Make sure this option is
869 " does not require a value!");
895 StringRef Value;
938 Handler = LookupOption(ArgName, Value);
950 Handler = LookupOption(ArgName, Value);
954 Handler = HandlePrefixedOrGroupedOption(ArgName, Value, ErrorParsing,
990 ErrorParsing |= ProvideOption(Handler, ArgName, Value, argc, argv, i);
1027 Done = true; // Optional arguments want _at most_ one value
1120 bool Option::addOccurrence(unsigned pos, StringRef ArgName, StringRef Value,
1140 return handleOccurrence(pos, ArgName, Value);
1143 // getValueStr - Get the value description string, using "DefaultMsg" if nothing
1213 bool &Value) {
1216 Value = true;
1221 Value = false;
1225 "' is invalid value for boolean argument! Try 0 or 1");
1231 boolOrDefault &Value) {
1234 Value = BOU_TRUE;
1238 Value = BOU_FALSE;
1243 "' is invalid value for boolean argument! Try 0 or 1");
1249 int &Value) {
1250 if (Arg.getAsInteger(0, Value))
1251 return O.error("'" + Arg + "' value invalid for integer argument!");
1258 unsigned &Value) {
1260 if (Arg.getAsInteger(0, Value))
1261 return O.error("'" + Arg + "' value invalid for uint argument!");
1269 unsigned long long &Value) {
1271 if (Arg.getAsInteger(0, Value))
1272 return O.error("'" + Arg + "' value invalid for uint argument!");
1278 static bool parseDouble(Option &O, StringRef Arg, double &Value) {
1282 Value = strtod(ArgStart, &End);
1284 return O.error("'" + Arg + "' value invalid for floating point argument!");
1360 // printGenericOptionDiff - Print the value of this option and it's default.
1362 // "Generic" options have each value mapped to a name.
1364 const Option &O, const GenericOptionValue &Value,
1371 if (Value.compare(getOptionValue(i)))
1387 outs() << "= *unknown option value*\n";
1390 // printOptionDiff - Specializations for printing basic value types.
1439 outs() << "= *cannot print option value*\n";
1497 void operator=(bool Value) {
1498 if (!Value)
1544 // It shall return a negative value if A's name should be lexicographically
1545 // ordered before B's name. It returns a value greater equal zero otherwise.
1639 void operator=(bool Value);
1698 void HelpPrinterWrapper::operator=(bool Value) {
1699 if (!Value)
1715 // Print the value of each option.