Make use of C++11 range-based for

Should be available now that support for LLVM < 3.5 has been dropped.
This commit is contained in:
Martin 2015-11-01 14:29:58 +01:00
parent 3d803c7a1c
commit 2d959ea540
34 changed files with 182 additions and 335 deletions

View file

@ -183,17 +183,8 @@ bool emit(raw_ostream& os, RecordKeeper& records)
map<string, Record*> defs = records.getDefs();
#endif
for(
#if LDC_LLVM_VER >= 306
auto it = defs.cbegin();
#else
map<string, Record* >::iterator it = defs.begin();
#endif
it != defs.end();
it++)
{
processRecord(os, *(*it).second, arch);
}
for (const auto& d : defs)
processRecord(os, *d.second, arch);
return false;
}