Enhance unmatched '.endr' directive error message in assembler.
authorPreston Gurd <preston.gurd@intel.com>
Wed, 19 Sep 2012 20:23:43 +0000 (20:23 +0000)
committerPreston Gurd <preston.gurd@intel.com>
Wed, 19 Sep 2012 20:23:43 +0000 (20:23 +0000)
The directive can be matched with directives other than '.rept'

Patch by Andy Zhang!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164245 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmParser.cpp
test/MC/AsmParser/macro-rept-err1.s

index 0a09aebbfecc872c524e944a55d63af315ca85b1..ca338abed4e46bf6af9f9438a5c4eb992070b388 100644 (file)
@@ -3404,7 +3404,7 @@ bool AsmParser::ParseDirectiveIrpc(SMLoc DirectiveLoc) {
 
 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.
index db92856a1d6d2e1bef9fcfe166d59ce849e6256f..cfa66878d9793831e0c7adfb40de2916ab58712d 100644 (file)
@@ -3,4 +3,4 @@
 
 .endr
 
-// CHECK: unexpected '.endr' directive, no current .rept
+// CHECK: unmatched '.endr' directive