MatchRegisterName() returns 0 if it can't match the register.

llvm-svn: 118339
This commit is contained in:
Bill Wendling 2010-11-06 10:45:34 +00:00
parent 6d2eb737af
commit 518e43c453
1 changed files with 2 additions and 2 deletions
llvm/lib/Target/ARM/AsmParser

View File

@ -387,8 +387,8 @@ int ARMAsmParser::TryParseRegister() {
// FIXME: Validate register for the current architecture; we have to do
// validation later, so maybe there is no need for this here.
int RegNum = MatchRegisterName(Tok.getString());
if (RegNum == -1)
unsigned RegNum = MatchRegisterName(Tok.getString());
if (RegNum == 0)
return -1;
Parser.Lex(); // Eat identifier token.
return RegNum;