From: Kevin Enderby Date: Tue, 18 May 2010 18:09:20 +0000 (+0000) Subject: Incorporate Daniel's suggestion and use !isdigit(CurPtr[0]) and not X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f2ad11624ebc73963007ee02958a9b41962422f;p=oota-llvm.git 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 --- diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp index 32b446fce77..7c098a6e6c6 100644 --- a/lib/MC/MCParser/AsmLexer.cpp +++ b/lib/MC/MCParser/AsmLexer.cpp @@ -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);