[llvm-commits] [llvm] r118339 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Bill Wendling
isanbard at gmail.com
Sat Nov 6 03:45:34 PDT 2010
Author: void
Date: Sat Nov 6 05:45:34 2010
New Revision: 118339
URL: http://llvm.org/viewvc/llvm-project?rev=118339&view=rev
Log:
MatchRegisterName() returns 0 if it can't match the register.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=118339&r1=118338&r2=118339&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Sat Nov 6 05:45:34 2010
@@ -387,8 +387,8 @@
// 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;
More information about the llvm-commits
mailing list