[llvm-commits] [llvm] r141239 - /llvm/trunk/lib/TableGen/TGParser.cpp
David Greene
greened at obbligato.org
Wed Oct 5 15:42:54 PDT 2011
Author: greened
Date: Wed Oct 5 17:42:54 2011
New Revision: 141239
URL: http://llvm.org/viewvc/llvm-project?rev=141239&view=rev
Log:
Prefix Template Arg Names with Multiclass Name
For consistency, prefix multiclass template arg names with the
multiclass name followed by "::" to avoid name clashes among
multiclass arguments and other entities in the multiclass.
Modified:
llvm/trunk/lib/TableGen/TGParser.cpp
Modified: llvm/trunk/lib/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=141239&r1=141238&r2=141239&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Wed Oct 5 17:42:54 2011
@@ -650,6 +650,9 @@
return VarInit::get(Name, RV->getType());
std::string TemplateArgName = CurRec->getName()+":"+Name;
+ if (CurMultiClass)
+ TemplateArgName = CurMultiClass->Rec.getName()+"::"+TemplateArgName;
+
if (CurRec->isTemplateArg(TemplateArgName)) {
const RecordVal *RV = CurRec->getValue(TemplateArgName);
assert(RV && "Template arg doesn't exist??");
More information about the llvm-commits
mailing list