forked from OSchip/llvm-project
MatchRegisterName() returns 0 if it can't match the register.
llvm-svn: 118339
This commit is contained in:
parent
6d2eb737af
commit
518e43c453
llvm/lib/Target/ARM/AsmParser
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue