Rename the CurMultiClass formal parameter of TGParser::AddSubMultiClass

so that it doesn't shadow the instance variable of the same name.
Make the parameter names in method declarations match the definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson 2009-04-30 18:26:19 +00:00
parent 1d512df4a9
commit 440548dd1f
2 changed files with 11 additions and 10 deletions

View File

@ -196,14 +196,14 @@ bool TGParser::AddSubClass(Record *CurRec, SubClassReference &SubClass) {
}
/// AddSubMultiClass - Add SubMultiClass as a subclass to
/// CurMultiClass, resolving its template args as SubMultiClass's
/// CurMC, resolving its template args as SubMultiClass's
/// template arguments.
bool TGParser::AddSubMultiClass(MultiClass *CurMultiClass,
bool TGParser::AddSubMultiClass(MultiClass *CurMC,
SubMultiClassReference &SubMultiClass) {
MultiClass *SMC = SubMultiClass.MC;
Record *CurRec = &CurMultiClass->Rec;
Record *CurRec = &CurMC->Rec;
const std::vector<RecordVal> &MCVals = CurMultiClass->Rec.getValues();
const std::vector<RecordVal> &MCVals = CurRec->getValues();
// Add all of the values in the subclass into the current class.
const std::vector<RecordVal> &SMCVals = SMC->Rec.getValues();
@ -211,7 +211,7 @@ bool TGParser::AddSubMultiClass(MultiClass *CurMultiClass,
if (AddValue(CurRec, SubMultiClass.RefLoc, SMCVals[i]))
return true;
int newDefStart = CurMultiClass->DefPrototypes.size();
int newDefStart = CurMC->DefPrototypes.size();
// Add all of the defs in the subclass into the current multiclass.
for (MultiClass::RecordVector::const_iterator i = SMC->DefPrototypes.begin(),
@ -226,7 +226,7 @@ bool TGParser::AddSubMultiClass(MultiClass *CurMultiClass,
if (AddValue(NewDef, SubMultiClass.RefLoc, MCVals[i]))
return true;
CurMultiClass->DefPrototypes.push_back(NewDef);
CurMC->DefPrototypes.push_back(NewDef);
}
const std::vector<std::string> &SMCTArgs = SMC->Rec.getTemplateArgs();
@ -257,8 +257,8 @@ bool TGParser::AddSubMultiClass(MultiClass *CurMultiClass,
// If a value is specified for this template arg, set it in the
// new defs now.
for (MultiClass::RecordVector::iterator j =
CurMultiClass->DefPrototypes.begin() + newDefStart,
jend = CurMultiClass->DefPrototypes.end();
CurMC->DefPrototypes.begin() + newDefStart,
jend = CurMC->DefPrototypes.end();
j != jend;
++j) {
Record *Def = *j;

View File

@ -67,7 +67,8 @@ private: // Semantic analysis methods.
bool SetValue(Record *TheRec, TGLoc Loc, const std::string &ValName,
const std::vector<unsigned> &BitList, Init *V);
bool AddSubClass(Record *Rec, SubClassReference &SubClass);
bool AddSubMultiClass(MultiClass *MV, SubMultiClassReference &SubMultiClass);
bool AddSubMultiClass(MultiClass *CurMC,
SubMultiClassReference &SubMultiClass);
private: // Parser methods.
bool ParseObjectList();
@ -88,7 +89,7 @@ private: // Parser methods.
std::string ParseDeclaration(Record *CurRec, bool ParsingTemplateArgs);
SubClassReference ParseSubClassReference(Record *CurRec, bool isDefm);
SubMultiClassReference ParseSubMultiClassReference(MultiClass *CurMultiClass);
SubMultiClassReference ParseSubMultiClassReference(MultiClass *CurMC);
Init *ParseIDValue(Record *CurRec);
Init *ParseIDValue(Record *CurRec, const std::string &Name, TGLoc NameLoc);