From e338565757bfcfe9d762751c976684f66954fb45 Mon Sep 17 00:00:00 2001 From: David Greene Date: Wed, 19 Oct 2011 13:04:13 +0000 Subject: Add NAME Member Add a Value named "NAME" to each Record. This will be set to the def or defm name when instantiating multiclasses. This will replace the #NAME# processing hack once paste functionality is in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142518 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/TableGen/TGParser.cpp') diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 45625f98d9..085136d481 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -1744,7 +1744,7 @@ bool TGParser::ParseClass() { Record *CurRec = Records.getClass(Lex.getCurStrVal()); if (CurRec) { // If the body was previously defined, this is an error. - if (!CurRec->getValues().empty() || + if (CurRec->getValues().size() > 1 || // Account for NAME. !CurRec->getSuperClasses().empty() || !CurRec->getTemplateArgs().empty()) return TokError("Class '" + CurRec->getNameInitAsString() -- cgit v1.2.3-18-g5258