[llvm-commits] [llvm] r164245 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/macro-rept-err1.s

Preston Gurd preston.gurd at intel.com
Wed Sep 19 13:23:43 PDT 2012


Author: pgurd
Date: Wed Sep 19 15:23:43 2012
New Revision: 164245

URL: http://llvm.org/viewvc/llvm-project?rev=164245&view=rev
Log:
Enhance unmatched '.endr' directive error message in assembler.
The directive can be matched with directives other than '.rept'

Patch by Andy Zhang!


Modified:
    llvm/trunk/lib/MC/MCParser/AsmParser.cpp
    llvm/trunk/test/MC/AsmParser/macro-rept-err1.s

Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=164245&r1=164244&r2=164245&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Sep 19 15:23:43 2012
@@ -3404,7 +3404,7 @@
 
 bool AsmParser::ParseDirectiveEndr(SMLoc DirectiveLoc) {
   if (ActiveMacros.empty())
-    return TokError("unexpected '.endr' directive, no current .rept");
+    return TokError("unmatched '.endr' directive");
 
   // The only .repl that should get here are the ones created by
   // InstantiateMacroLikeBody.

Modified: llvm/trunk/test/MC/AsmParser/macro-rept-err1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/macro-rept-err1.s?rev=164245&r1=164244&r2=164245&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/macro-rept-err1.s (original)
+++ llvm/trunk/test/MC/AsmParser/macro-rept-err1.s Wed Sep 19 15:23:43 2012
@@ -3,4 +3,4 @@
 
 .endr
 
-// CHECK: unexpected '.endr' directive, no current .rept
+// CHECK: unmatched '.endr' directive





More information about the llvm-commits mailing list