Lines Matching refs:Radix
320 /// sequence of radix up to 36 to an unsigned long long value.
321 bool llvm::getAsUnsignedInteger(StringRef Str, unsigned Radix,
323 // Autosense radix if not specified.
324 if (Radix == 0)
325 Radix = GetAutoSenseRadix(Str);
327 // Empty strings (after the radix autosense) are invalid.
330 // Parse all the bytes of the string given this radix. Watch for overflow.
343 // If the parsed value is larger than the integer radix, the string is
345 if (CharVal >= Radix)
350 Result = Result*Radix+CharVal;
353 if (Result/Radix < PrevResult)
362 bool llvm::getAsSignedInteger(StringRef Str, unsigned Radix,
368 if (getAsUnsignedInteger(Str, Radix, ULLVal) ||
377 if (getAsUnsignedInteger(Str.substr(1), Radix, ULLVal) ||
388 bool StringRef::getAsInteger(unsigned Radix, APInt &Result) const {
391 // Autosense radix if not specified.
392 if (Radix == 0)
393 Radix = GetAutoSenseRadix(Str);
395 assert(Radix > 1 && Radix <= 36);
397 // Empty strings (after the radix autosense) are invalid.
413 while ((1U << Log2Radix) < Radix) Log2Radix++;
414 bool IsPowerOf2Radix = ((1U << Log2Radix) == Radix);
425 RadixAP = APInt(BitWidth, Radix);
429 // Parse all the bytes of the string given this radix.
442 // If the parsed value is larger than the integer radix, the string is
444 if (CharVal >= Radix)