<div dir="ltr">On Thu, May 29, 2014 at 3:05 PM, Janne Grunau <span dir="ltr"><<a href="mailto:j@jannau.net" target="_blank">j@jannau.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fixes macros with varargs if the macro instantiation has a trailing comment.<br>
---<br>
lib/MC/MCParser/AsmLexer.cpp | 4 ++--<br>
test/MC/AsmParser/vararg.s | 6 +++---<br>
2 files changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/lib/MC/MCParser/AsmLexer.cpp b/lib/MC/MCParser/AsmLexer.cpp<br>
index bca516e..7991ef5 100644<br>
--- a/lib/MC/MCParser/AsmLexer.cpp<br>
+++ b/lib/MC/MCParser/AsmLexer.cpp<br>
@@ -201,8 +201,8 @@ AsmToken AsmLexer::LexLineComment() {<br>
CurChar = getNextChar();<br>
<br>
if (CurChar == EOF)<br>
- return AsmToken(AsmToken::Eof, StringRef(CurPtr, 0));<br>
- return AsmToken(AsmToken::EndOfStatement, StringRef(CurPtr, 0));<br>
+ return AsmToken(AsmToken::Eof, StringRef(TokStart, 0));<br>
+ return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 0));<br>
}<br>
<br>
static void SkipIgnoredIntegerSuffix(const char *&CurPtr) {<br>
diff --git a/test/MC/AsmParser/vararg.s b/test/MC/AsmParser/vararg.s<br>
index b27668e..4b145f7 100644<br>
--- a/test/MC/AsmParser/vararg.s<br>
+++ b/test/MC/AsmParser/vararg.s<br>
@@ -13,7 +13,7 @@<br>
<br>
.macro ifcc3 arg0, arg1:vararg<br>
.if cc<br>
- movl \arg0, \arg1<br>
+ movl \arg1, \arg0<br>
.endif<br>
.endm<br>
<br>
@@ -31,8 +31,8 @@<br>
<br>
ifcc2 %eax %ebx<br>
ifcc2 %ecx, %ebx<br>
- ifcc3 %ecx %eax<br>
- ifcc3 %eax, %ecx<br>
+ ifcc3 %eax %ecx ## test<br>
+ ifcc3 %ecx, %eax ## test<br>
<br>
// CHECK-NOT movl<br>
// CHECK: subl $1, %esp<br></blockquote><div><br></div><div>Might be nicer to actually create a second macro and use that to keep the coverage for in order and out of order parameters to variadic macros.</div><div> <br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>