From: Bob Wilson Date: Thu, 30 Apr 2009 18:26:19 +0000 (+0000) Subject: Rename the CurMultiClass formal parameter of TGParser::AddSubMultiClass X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=440548dd1f78682e372a38cacccf7c5ac1781b2c;p=oota-llvm.git 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 --- diff --git a/utils/TableGen/TGParser.cpp b/utils/TableGen/TGParser.cpp index 1907cf5666e..2e2ec3118b0 100644 --- a/utils/TableGen/TGParser.cpp +++ b/utils/TableGen/TGParser.cpp @@ -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 &MCVals = CurMultiClass->Rec.getValues(); + const std::vector &MCVals = CurRec->getValues(); // Add all of the values in the subclass into the current class. const std::vector &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 &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; diff --git a/utils/TableGen/TGParser.h b/utils/TableGen/TGParser.h index 6d041b26679..358fee65cb2 100644 --- a/utils/TableGen/TGParser.h +++ b/utils/TableGen/TGParser.h @@ -67,7 +67,8 @@ private: // Semantic analysis methods. bool SetValue(Record *TheRec, TGLoc Loc, const std::string &ValName, const std::vector &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);