• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching refs:Str

142 size_t StringRef::find(StringRef Str, size_t From) const {  in find()  argument
146 const char *Needle = Str.data(); in find()
147 size_t N = Str.size(); in find()
172 BadCharSkip[(uint8_t)Str[i]] = N-1-i; in find()
189 size_t StringRef::rfind(StringRef Str) const { in rfind()
190 size_t N = Str.size(); in rfind()
195 if (substr(i, N).equals(Str)) in rfind()
342 size_t StringRef::count(StringRef Str) const { in count()
344 size_t N = Str.size(); in count()
348 if (substr(i, N).equals(Str)) in count()
353 static unsigned GetAutoSenseRadix(StringRef &Str) { in GetAutoSenseRadix() argument
354 if (Str.startswith("0x") || Str.startswith("0X")) { in GetAutoSenseRadix()
355 Str = Str.substr(2); in GetAutoSenseRadix()
359 if (Str.startswith("0b") || Str.startswith("0B")) { in GetAutoSenseRadix()
360 Str = Str.substr(2); in GetAutoSenseRadix()
364 if (Str.startswith("0o")) { in GetAutoSenseRadix()
365 Str = Str.substr(2); in GetAutoSenseRadix()
369 if (Str.startswith("0")) in GetAutoSenseRadix()
378 bool llvm::getAsUnsignedInteger(StringRef Str, unsigned Radix, in getAsUnsignedInteger() argument
382 Radix = GetAutoSenseRadix(Str); in getAsUnsignedInteger()
385 if (Str.empty()) return true; in getAsUnsignedInteger()
389 while (!Str.empty()) { in getAsUnsignedInteger()
391 if (Str[0] >= '0' && Str[0] <= '9') in getAsUnsignedInteger()
392 CharVal = Str[0]-'0'; in getAsUnsignedInteger()
393 else if (Str[0] >= 'a' && Str[0] <= 'z') in getAsUnsignedInteger()
394 CharVal = Str[0]-'a'+10; in getAsUnsignedInteger()
395 else if (Str[0] >= 'A' && Str[0] <= 'Z') in getAsUnsignedInteger()
396 CharVal = Str[0]-'A'+10; in getAsUnsignedInteger()
413 Str = Str.substr(1); in getAsUnsignedInteger()
419 bool llvm::getAsSignedInteger(StringRef Str, unsigned Radix, in getAsSignedInteger() argument
424 if (Str.empty() || Str.front() != '-') { in getAsSignedInteger()
425 if (getAsUnsignedInteger(Str, Radix, ULLVal) || in getAsSignedInteger()
434 if (getAsUnsignedInteger(Str.substr(1), Radix, ULLVal) || in getAsSignedInteger()
446 StringRef Str = *this; in getAsInteger() local
450 Radix = GetAutoSenseRadix(Str); in getAsInteger()
455 if (Str.empty()) return true; in getAsInteger()
459 while (!Str.empty() && Str.front() == '0') in getAsInteger()
460 Str = Str.substr(1); in getAsInteger()
463 if (Str.empty()) { in getAsInteger()
473 unsigned BitWidth = Log2Radix * Str.size(); in getAsInteger()
488 while (!Str.empty()) { in getAsInteger()
490 if (Str[0] >= '0' && Str[0] <= '9') in getAsInteger()
491 CharVal = Str[0]-'0'; in getAsInteger()
492 else if (Str[0] >= 'a' && Str[0] <= 'z') in getAsInteger()
493 CharVal = Str[0]-'a'+10; in getAsInteger()
494 else if (Str[0] >= 'A' && Str[0] <= 'Z') in getAsInteger()
495 CharVal = Str[0]-'A'+10; in getAsInteger()
514 Str = Str.substr(1); in getAsInteger()