forked from OSchip/llvm-project
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. llvm-svn: 141239
This commit is contained in:
parent
4fff1e2f5e
commit
47a665e93e
|
@ -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??");
|
||||
|
|
Loading…
Reference in New Issue