mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-30 20:34:21 +00:00
[TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
40c791eda9
commit
44bc71549e
@ -1646,9 +1646,11 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
|
||||
const std::vector<Init *> &TArgs = R.getTemplateArgs();
|
||||
if (!TArgs.empty()) {
|
||||
OS << "<";
|
||||
for (unsigned i = 0, e = TArgs.size(); i != e; ++i) {
|
||||
if (i) OS << ", ";
|
||||
const RecordVal *RV = R.getValue(TArgs[i]);
|
||||
bool NeedComma = false;
|
||||
for (const Init *TA : TArgs) {
|
||||
if (NeedComma) OS << ", ";
|
||||
NeedComma = true;
|
||||
const RecordVal *RV = R.getValue(TA);
|
||||
assert(RV && "Template argument record not found??");
|
||||
RV->print(OS, false);
|
||||
}
|
||||
@ -1659,18 +1661,17 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
|
||||
const std::vector<Record*> &SC = R.getSuperClasses();
|
||||
if (!SC.empty()) {
|
||||
OS << "\t//";
|
||||
for (unsigned i = 0, e = SC.size(); i != e; ++i)
|
||||
OS << " " << SC[i]->getNameInitAsString();
|
||||
for (const Record *Super : SC)
|
||||
OS << " " << Super->getNameInitAsString();
|
||||
}
|
||||
OS << "\n";
|
||||
|
||||
const std::vector<RecordVal> &Vals = R.getValues();
|
||||
for (unsigned i = 0, e = Vals.size(); i != e; ++i)
|
||||
if (Vals[i].getPrefix() && !R.isTemplateArg(Vals[i].getName()))
|
||||
OS << Vals[i];
|
||||
for (unsigned i = 0, e = Vals.size(); i != e; ++i)
|
||||
if (!Vals[i].getPrefix() && !R.isTemplateArg(Vals[i].getName()))
|
||||
OS << Vals[i];
|
||||
for (const RecordVal &Val : R.getValues())
|
||||
if (Val.getPrefix() && !R.isTemplateArg(Val.getName()))
|
||||
OS << Val;
|
||||
for (const RecordVal &Val : R.getValues())
|
||||
if (!Val.getPrefix() && !R.isTemplateArg(Val.getName()))
|
||||
OS << Val;
|
||||
|
||||
return OS << "}\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user