[PATCH] MC: Better management of macro arguments

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Jan 28 08:49:39 PST 2014


  There seems to be a few things going on with this patch at the same time. If I understand it correctly, the gist is that in drops the auto-detect logic and replaces it with "gnu uses spaces or commas, darwin uses only commas".

  The patch also includes cleanups such as the RAII class.

  What I don't understand is why the extra test changes.

  May I suggest:
  * Commit the RAII cleanup first. No test changes. (it is really just a cleanup, right?)
  * If we do need the different darwin X gnu logic (grosbach, please check), commit a patch just duplicating the test and changing i386-unknown-unknown to darwin in one file and linux on another.

  With that it should then be clear exactly what the patch changes in each testcase.


================
Comment at: lib/MC/MCParser/AsmParser.cpp:1886
@@ -1874,4 +1885,3 @@
   for (;;) {
     if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal)) {
       return TokError("unexpected token in macro instantiation");
----------------
You can now remove the {.


================
Comment at: test/MC/AsmParser/darwin_macros.s:47
@@ -46,3 +47,1 @@
 
-.macro test5 _a
-.globl "\_a"
----------------
Why this change? Are named arguments not supported on darwin?


http://llvm-reviews.chandlerc.com/D2634



More information about the llvm-commits mailing list