aboutsummaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-05 22:42:54 +0000
committerDavid Greene <greened@obbligato.org>2011-10-05 22:42:54 +0000
commitcaa25c81cd12f8a25b6cb7a3cba865a0dbcd4eaf (patch)
treeb75f11b2229d09bd951c563981441251aae2fdb8 /lib/TableGen/TGParser.cpp
parent6494af4d7797ef2240e628a0fd045231afafaeeb (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index ed51977c3d..97240481fc 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -650,6 +650,9 @@ Init *TGParser::ParseIDValue(Record *CurRec,
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??");