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

View File

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