mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-24 21:14:56 +00:00
Use StringRef::startswith_lower. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7de1b3bd45
commit
565ebfff15
@ -907,19 +907,19 @@ MatchRegisterName(const AsmToken &Tok, unsigned &RegNo, int64_t &IntVal) {
|
||||
RegNo = PPC::VRSAVE;
|
||||
IntVal = 256;
|
||||
return false;
|
||||
} else if (Name.substr(0, 1).equals_lower("r") &&
|
||||
} else if (Name.startswith_lower("r") &&
|
||||
!Name.substr(1).getAsInteger(10, IntVal) && IntVal < 32) {
|
||||
RegNo = isPPC64()? XRegs[IntVal] : RRegs[IntVal];
|
||||
return false;
|
||||
} else if (Name.substr(0, 1).equals_lower("f") &&
|
||||
} else if (Name.startswith_lower("f") &&
|
||||
!Name.substr(1).getAsInteger(10, IntVal) && IntVal < 32) {
|
||||
RegNo = FRegs[IntVal];
|
||||
return false;
|
||||
} else if (Name.substr(0, 1).equals_lower("v") &&
|
||||
} else if (Name.startswith_lower("v") &&
|
||||
!Name.substr(1).getAsInteger(10, IntVal) && IntVal < 32) {
|
||||
RegNo = VRegs[IntVal];
|
||||
return false;
|
||||
} else if (Name.substr(0, 2).equals_lower("cr") &&
|
||||
} else if (Name.startswith_lower("cr") &&
|
||||
!Name.substr(2).getAsInteger(10, IntVal) && IntVal < 8) {
|
||||
RegNo = CRRegs[IntVal];
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user