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".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby 2010-05-18 18:09:20 +00:00
parent d8ba292c9b
commit 9f2ad11624

View File

@ -154,7 +154,7 @@ AsmToken AsmLexer::LexDigit() {
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);