[llvm-commits] [llvm] r114733 - in /llvm/trunk: lib/MC/MCParser/AsmLexer.cpp test/MC/AsmParser/floating-literals.s
Daniel Dunbar
daniel at zuster.org
Fri Sep 24 10:10:26 PDT 2010
Author: ddunbar
Date: Fri Sep 24 12:10:26 2010
New Revision: 114733
URL: http://llvm.org/viewvc/llvm-project?rev=114733&view=rev
Log:
MC/AsmParser: Handle a missed case of floating literals in the lexer.
Modified:
llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
llvm/trunk/test/MC/AsmParser/floating-literals.s
Modified: llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmLexer.cpp?rev=114733&r1=114732&r2=114733&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmLexer.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmLexer.cpp Fri Sep 24 12:10:26 2010
@@ -145,7 +145,7 @@
/// Decimal integer: [1-9][0-9]*
AsmToken AsmLexer::LexDigit() {
// Decimal integer: [1-9][0-9]*
- if (CurPtr[-1] != '0') {
+ if (CurPtr[-1] != '0' || CurPtr[0] == '.') {
while (isdigit(*CurPtr))
++CurPtr;
Modified: llvm/trunk/test/MC/AsmParser/floating-literals.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/floating-literals.s?rev=114733&r1=114732&r2=114733&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/floating-literals.s (original)
+++ llvm/trunk/test/MC/AsmParser/floating-literals.s Fri Sep 24 12:10:26 2010
@@ -10,3 +10,6 @@
# CHECK: .quad 4597526701198935065
# CHECK: .quad -4600933674317040845
.double 5, .232, -11.1
+
+# CHECK: .quad 0
+.double 0.0
More information about the llvm-commits
mailing list