[PATCH] Integrated assembler. :vararg macro.
David Majnemer
david.majnemer at gmail.com
Fri Apr 18 15:08:24 PDT 2014
I'd like to see more tests here. `.macro` statements with normal arguments preceding the `:vararg` one. Something like:
.macro foo bar, baz:vararg
...
.endmacro
A test without a comma between bar and baz would be good as well.
================
Comment at: lib/MC/MCParser/AsmParser.cpp:3294
@@ -3270,3 +3293,3 @@
ParamLoc = Lexer.getLoc();
- if (parseMacroArgument(Parameter.Value))
+ if (parseMacroArgument(Parameter.Value, false))
return true;
----------------
Please use `/*Varag=*/false` to make it clear what is going on.
================
Comment at: lib/MC/MCParser/AsmParser.cpp:1828-1830
@@ -1825,2 +1827,5 @@
it != ie; ++it)
- if (it->getKind() == AsmToken::String)
+ // parseMacroArgument creates string token for vararg
+ // but we don't need to strip quotes in this case, so we
+ // just will use getString method for vararg string.
+ if (it->getKind() == AsmToken::String && !Vararg)
----------------
This comment is a bit hard to read, perhaps something more like:
// We want the quotes around the string's contents when parsing for varargs.
http://reviews.llvm.org/D3354
More information about the llvm-commits
mailing list