[PATCH] IAS: support .rep as an alias for .rept

Saleem Abdulrasool compnerd at compnerd.org
Thu Dec 26 23:44:41 PST 2013



================
Comment at: lib/MC/MCParser/AsmParser.cpp:3967
@@ -3959,3 +3966,3 @@
   if (parseAbsoluteExpression(Count))
-    return TokError("unexpected token in '.rept' directive");
+    return TokError("unexpected token in '" + Dir + "' directive");
 
----------------
Renato Golin wrote:
> I see why you're passing DK here, but I think the message could just as well be '.rep/.rept' and avoid the extra argument when there is no need for the logic, just error message.
> 
> TokError will report the line, right?
Yes, the TokError will report the location.  However, given that clang/llvm have a reputation for having excellent diagnostics, I think, I much prefer the clearer explicit directive as opposed to the generic message.

================
Comment at: test/MC/AsmParser/directive_rept.s:1
@@ +1,2 @@
+# RUN: llvm-mc -triple i686-elf -filetype asm -o - %s | FileCheck %s
+
----------------
Renato Golin wrote:
> this might need to be in an x86-specific section... ARM bots don't compile the x86 back-end and this will likely fail.
It looks like all the other tests in this location do not have any x86-specific sectioning?  Am I missing something?


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



More information about the llvm-commits mailing list