mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
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
This commit is contained in:
parent
6494af4d77
commit
caa25c81cd
@ -650,6 +650,9 @@ Init *TGParser::ParseIDValue(Record *CurRec,
|
|||||||
return VarInit::get(Name, RV->getType());
|
return VarInit::get(Name, RV->getType());
|
||||||
|
|
||||||
std::string TemplateArgName = CurRec->getName()+":"+Name;
|
std::string TemplateArgName = CurRec->getName()+":"+Name;
|
||||||
|
if (CurMultiClass)
|
||||||
|
TemplateArgName = CurMultiClass->Rec.getName()+"::"+TemplateArgName;
|
||||||
|
|
||||||
if (CurRec->isTemplateArg(TemplateArgName)) {
|
if (CurRec->isTemplateArg(TemplateArgName)) {
|
||||||
const RecordVal *RV = CurRec->getValue(TemplateArgName);
|
const RecordVal *RV = CurRec->getValue(TemplateArgName);
|
||||||
assert(RV && "Template arg doesn't exist??");
|
assert(RV && "Template arg doesn't exist??");
|
||||||
|
Loading…
Reference in New Issue
Block a user