diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-11-06 10:45:34 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-11-06 10:45:34 +0000 |
commit | d68fd9c79eeb30980c18dc3f74b2da839bb259f3 (patch) | |
tree | 88dc788bf6f9865e5b1979400ee9a1395526485f | |
parent | 1d6a26507bfd75758f5c8a29bccf577784ead751 (diff) |
MatchRegisterName() returns 0 if it can't match the register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118339 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 3cb93a317a..b41b71d4b0 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; |