mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224005 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4fca0dd75f
commit
3490558860
@ -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