Lines Matching defs:Name
93 // Default to an unknown platform name.
314 static StringRef removeGCCRegisterPrefix(StringRef Name) {
315 if (Name[0] == '%' || Name[0] == '#')
316 Name = Name.substr(1);
318 return Name;
324 bool TargetInfo::isValidClobber(StringRef Name) const {
325 return (isValidGCCRegisterName(Name) ||
326 Name == "memory" || Name == "cc");
330 /// is a valid register name according to GCC. This is used by Sema for
332 bool TargetInfo::isValidGCCRegisterName(StringRef Name) const {
333 if (Name.empty())
340 Name = removeGCCRegisterPrefix(Name);
341 if (Name.empty())
346 // If we have a number it maps to an entry in the register name array.
347 if (isDigit(Name[0])) {
349 if (!Name.getAsInteger(0, n))
355 if (Name == Names[i])
367 // Make sure the register that the additional name is for is within
369 if (AddlNames[i].Names[j] == Name && AddlNames[i].RegNum < NumNames)
382 if (Aliases[i].Aliases[j] == Name)
391 TargetInfo::getNormalizedGCCRegisterName(StringRef Name) const {
392 assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
395 Name = removeGCCRegisterPrefix(Name);
403 if (isDigit(Name[0])) {
405 if (!Name.getAsInteger(0, n)) {
420 // Make sure the register that the additional name is for is within
422 if (AddlNames[i].Names[j] == Name && AddlNames[i].RegNum < NumNames)
423 return Name;
435 if (Aliases[i].Aliases[j] == Name)
440 return Name;
444 const char *Name = Info.getConstraintStr().c_str();
446 if (*Name != '=' && *Name != '+')
449 if (*Name == '+')
452 Name++;
453 while (*Name) {
454 switch (*Name) {
456 if (!validateAsmConstraint(Name, Info)) {
486 if (Name[1] == '=' || Name[1] == '+')
487 Name++;
490 while (Name[1] && Name[1] != ',')
491 Name++;
499 Name++;
512 bool TargetInfo::resolveSymbolicName(const char *&Name,
516 assert(*Name == '[' && "Symbolic name did not start with '['");
517 Name++;
518 const char *Start = Name;
519 while (*Name && *Name != ']')
520 Name++;
522 if (!*Name) {
527 Name - Start);
539 const char *Name = Info.ConstraintStr.c_str();
541 if (!*Name)
544 while (*Name) {
545 switch (*Name) {
548 if (*Name >= '0' && *Name <= '9') {
549 const char *DigitStart = Name;
550 while (Name[1] >= '0' && Name[1] <= '9')
551 Name++;
552 const char *DigitEnd = Name;
573 } else if (!validateAsmConstraint(Name, Info)) {
582 if (!resolveSymbolicName(Name, OutputConstraints, NumOutputs, Index))
611 if (!validateAsmConstraint(Name, Info))
636 while (Name[1] && Name[1] != ',')
637 Name++;
645 Name++;
651 bool TargetCXXABI::tryParse(llvm::StringRef name) {
653 Kind kind = llvm::StringSwitch<Kind>(name)