Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!

llvm-svn: 206474
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 3bc7b8f..9f932ab 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -350,18 +350,16 @@
 }
 
 void GlobalModuleIndex::dump() {
-  std::fprintf(stderr, "*** Global Module Index Dump:\n");
-  std::fprintf(stderr, "Module files:\n");
-  for (llvm::SmallVector<ModuleInfo, 16>::iterator I = Modules.begin(),
-      E = Modules.end(); I != E; ++I) {
-    ModuleInfo *MI = (ModuleInfo*)I;
-    std::fprintf(stderr, "** %s\n", MI->FileName.c_str());
-    if (MI->File)
-      MI->File->dump();
+  llvm::errs() << "*** Global Module Index Dump:\n";
+  llvm::errs() << "Module files:\n";
+  for (auto MI : Modules) {
+    llvm::errs() << "** " << MI.FileName << "\n";
+    if (MI.File)
+      MI.File->dump();
     else
-      std::fprintf(stderr, "\n");
+      llvm::errs() << "\n";
   }
-  std::fprintf(stderr, "\n");
+  llvm::errs() << "\n";
 }
 
 //----------------------------------------------------------------------------//