[llvm-commits] [llvm] r117298 - in /llvm/trunk: lib/MC/MCParser/AsmLexer.cpp test/MC/AsmParser/exprs.s
Daniel Dunbar
daniel at zuster.org
Mon Oct 25 13:18:53 PDT 2010
Author: ddunbar
Date: Mon Oct 25 15:18:53 2010
New Revision: 117298
URL: http://llvm.org/viewvc/llvm-project?rev=117298&view=rev
Log:
MC/AsmLexer: Fix bug in source location for Slash token.
Modified:
llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
llvm/trunk/test/MC/AsmParser/exprs.s
Modified: llvm/trunk/lib/MC/MCParser/AsmLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmLexer.cpp?rev=117298&r1=117297&r2=117298&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmLexer.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmLexer.cpp Mon Oct 25 15:18:53 2010
@@ -119,7 +119,7 @@
switch (*CurPtr) {
case '*': break; // C style comment.
case '/': return ++CurPtr, LexLineComment();
- default: return AsmToken(AsmToken::Slash, StringRef(CurPtr, 1));
+ default: return AsmToken(AsmToken::Slash, StringRef(CurPtr-1, 1));
}
// C Style comment.
Modified: llvm/trunk/test/MC/AsmParser/exprs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/exprs.s?rev=117298&r1=117297&r2=117298&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/exprs.s (original)
+++ llvm/trunk/test/MC/AsmParser/exprs.s Mon Oct 25 15:18:53 2010
@@ -19,9 +19,8 @@
check_expr +1, 1
check_expr 1 + 2, 3
check_expr 1 & 3, 1
- // FIXME: There is a bug here in macro expansion.
- .byte 4 / 2
- .byte 4 / -2
+ check_expr 4 / 2, 2
+ check_expr 4 / -2, -2
check_expr 1 == 1, 1
check_expr 1 == 0, 0
check_expr 1 > 0, 1
More information about the llvm-commits
mailing list