mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Use range-based for loops. NFC
llvm-svn: 224005
This commit is contained in:
parent
e241661f0e
commit
9a511af4f9
@ -64,11 +64,8 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
|
||||
return 1;
|
||||
}
|
||||
DepOut.os() << OutputFilename << ":";
|
||||
const TGLexer::DependenciesMapTy &Dependencies = Parser.getDependencies();
|
||||
for (TGLexer::DependenciesMapTy::const_iterator I = Dependencies.begin(),
|
||||
E = Dependencies.end();
|
||||
I != E; ++I) {
|
||||
DepOut.os() << " " << I->first;
|
||||
for (const auto &Dep : Parser.getDependencies()) {
|
||||
DepOut.os() << ' ' << Dep.first;
|
||||
}
|
||||
DepOut.os() << "\n";
|
||||
DepOut.keep();
|
||||
|
@ -143,9 +143,8 @@ bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
|
||||
break;
|
||||
case PrintEnums:
|
||||
{
|
||||
std::vector<Record*> Recs = Records.getAllDerivedDefinitions(Class);
|
||||
for (unsigned i = 0, e = Recs.size(); i != e; ++i)
|
||||
OS << Recs[i]->getName() << ", ";
|
||||
for (Record *Rec : Records.getAllDerivedDefinitions(Class))
|
||||
OS << Rec->getName() << ", ";
|
||||
OS << "\n";
|
||||
break;
|
||||
}
|
||||
@ -153,13 +152,12 @@ bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
|
||||
{
|
||||
SetTheory Sets;
|
||||
Sets.addFieldExpander("Set", "Elements");
|
||||
std::vector<Record*> Recs = Records.getAllDerivedDefinitions("Set");
|
||||
for (unsigned i = 0, e = Recs.size(); i != e; ++i) {
|
||||
OS << Recs[i]->getName() << " = [";
|
||||
const std::vector<Record*> *Elts = Sets.expand(Recs[i]);
|
||||
for (Record *Rec : Records.getAllDerivedDefinitions("Set")) {
|
||||
OS << Rec->getName() << " = [";
|
||||
const std::vector<Record*> *Elts = Sets.expand(Rec);
|
||||
assert(Elts && "Couldn't expand Set instance");
|
||||
for (unsigned ei = 0, ee = Elts->size(); ei != ee; ++ei)
|
||||
OS << ' ' << (*Elts)[ei]->getName();
|
||||
for (Record *Elt : *Elts)
|
||||
OS << ' ' << Elt->getName();
|
||||
OS << " ]\n";
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user