From: Preston Gurd Date: Wed, 19 Sep 2012 20:23:43 +0000 (+0000) Subject: Enhance unmatched '.endr' directive error message in assembler. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6579eea90dfeb7540e37307cc30c8677759c5e4d;p=oota-llvm.git Enhance unmatched '.endr' directive error message in assembler. 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 --- diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index 0a09aebbfec..ca338abed4e 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -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. diff --git a/test/MC/AsmParser/macro-rept-err1.s b/test/MC/AsmParser/macro-rept-err1.s index db92856a1d6..cfa66878d97 100644 --- a/test/MC/AsmParser/macro-rept-err1.s +++ b/test/MC/AsmParser/macro-rept-err1.s @@ -3,4 +3,4 @@ .endr -// CHECK: unexpected '.endr' directive, no current .rept +// CHECK: unmatched '.endr' directive