ARM .req register name aliases are case insensitive, just like regnames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-12-20 23:11:00 +00:00
parent 2fd0475cdb
commit aee718beac

View File

@ -2325,9 +2325,10 @@ int ARMAsmParser::tryParseRegister() {
.Default(0);
}
if (!RegNum) {
// Check for aliases registered via .req.
StringMap<unsigned>::const_iterator Entry =
RegisterReqs.find(Tok.getIdentifier());
// Check for aliases registered via .req. Canonicalize to lower case.
// That's more consistent since register names are case insensitive, and
// it's how the original entry was passed in from MC/MCParser/AsmParser.
StringMap<unsigned>::const_iterator Entry = RegisterReqs.find(lowerCase);
// If no match, return failure.
if (Entry == RegisterReqs.end())
return -1;