diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 3cb93a317a7..b41b71d4b0a 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -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;