[llvm-commits] [llvm] r162291 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/bad-macro.s
Rafael Espindola
rafael.espindola at gmail.com
Tue Aug 21 10:12:06 PDT 2012
Author: rafael
Date: Tue Aug 21 12:12:05 2012
New Revision: 162291
URL: http://llvm.org/viewvc/llvm-project?rev=162291&view=rev
Log:
Make the wording in of the "expected identifier" error in the .macro directive
consistent with the other "expected identifier" errors.
Extracted from the Andy/PaX patch. I added the test.
Added:
llvm/trunk/test/MC/AsmParser/bad-macro.s
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=162291&r1=162290&r2=162291&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Tue Aug 21 12:12:05 2012
@@ -3071,14 +3071,14 @@
SMLoc DirectiveLoc) {
StringRef Name;
if (getParser().ParseIdentifier(Name))
- return TokError("expected identifier in directive");
+ return TokError("expected identifier in '.macro' directive");
MacroParameters Parameters;
if (getLexer().isNot(AsmToken::EndOfStatement)) {
for (;;) {
MacroParameter Parameter;
if (getParser().ParseIdentifier(Parameter))
- return TokError("expected identifier in directive");
+ return TokError("expected identifier in '.macro' directive");
Parameters.push_back(Parameter);
if (getLexer().isNot(AsmToken::Comma))
Added: llvm/trunk/test/MC/AsmParser/bad-macro.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/bad-macro.s?rev=162291&view=auto
==============================================================================
--- llvm/trunk/test/MC/AsmParser/bad-macro.s (added)
+++ llvm/trunk/test/MC/AsmParser/bad-macro.s Tue Aug 21 12:12:05 2012
@@ -0,0 +1,9 @@
+// RUN: not llvm-mc -triple x86_64-apple-darwin10 %s 2>&1 | FileCheck %s
+
+.macro 23
+
+// CHECK: expected identifier in '.macro' directive
+
+.macro abc 33
+
+// CHECK: expected identifier in '.macro' directive
More information about the llvm-commits
mailing list