diff options
author | Kevin Enderby <enderby@apple.com> | 2010-05-18 18:09:20 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2010-05-18 18:09:20 +0000 |
commit | 7bcc9e94503b3f3cf08eb1143eafc9012a8234d8 (patch) | |
tree | a57a27b2b9d311d0fb0d6e29ada6fc70b013b397 | |
parent | 53e0631516f12dddf4d2114287dc735337c75406 (diff) | |
download | bcm5719-llvm-7bcc9e94503b3f3cf08eb1143eafc9012a8234d8.tar.gz bcm5719-llvm-7bcc9e94503b3f3cf08eb1143eafc9012a8234d8.zip |
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".
llvm-svn: 104039
-rw-r--r-- | llvm/lib/MC/MCParser/AsmLexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp index 32b446fce77..7c098a6e6c6 100644 --- a/llvm/lib/MC/MCParser/AsmLexer.cpp +++ b/llvm/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); |