Serialization: use range based for loop (NFC)
Just a small clean up noticed when doing post-commit review of Duncan's
previous change for ModuleFile memory ownership semantics. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293556 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index d638ecb..acdcaaf 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -1635,11 +1635,8 @@
/// reader.
unsigned getTotalNumPreprocessedEntities() const {
unsigned Result = 0;
- for (ModuleConstIterator I = ModuleMgr.begin(),
- E = ModuleMgr.end(); I != E; ++I) {
- Result += I->NumPreprocessedEntities;
- }
-
+ for (const auto &M : ModuleMgr)
+ Result += M.NumPreprocessedEntities;
return Result;
}