[llvm-commits] [llvm] r104039 - /llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
Kevin Enderby
enderby at apple.com
Tue May 18 11:09:21 PDT 2010
Author: enderby
Date: Tue May 18 13:09:20 2010
New Revision: 104039
URL: http://llvm.org/viewvc/llvm-project?rev=104039&view=rev
Log:
Incorporate Daniel's suggestion and use !isdigit(CurPtr[0]) and not
CurPtr[0] == '\n' when testing the character after a "0b" when looking
to see if it part of a something like "jmp 0b".
Modified:
llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
Modified: llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmLexer.cpp?rev=104039&r1=104038&r2=104039&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmLexer.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmLexer.cpp Tue May 18 13:09:20 2010
@@ -154,7 +154,7 @@
if (*CurPtr == 'b') {
++CurPtr;
// See if we actually have "0b" as part of something like "jmp 0b\n"
- if (CurPtr[0] == '\n') {
+ if (!isdigit(CurPtr[0])) {
--CurPtr;
StringRef Result(TokStart, CurPtr - TokStart);
return AsmToken(AsmToken::Integer, Result, 0);
More information about the llvm-commits
mailing list