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

John Thompson John.Thompson.JTSoftware at gmail.com
Thu Apr 17 10:06:13 PDT 2014


Author: jtsoftware
Date: Thu Apr 17 12:06:13 2014
New Revision: 206474

URL: http://llvm.org/viewvc/llvm-project?rev=206474&view=rev
Log:
Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!

Modified:
    cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp

Modified: cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp?rev=206474&r1=206473&r2=206474&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp (original)
+++ cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp Thu Apr 17 12:06:13 2014
@@ -350,18 +350,16 @@ void GlobalModuleIndex::printStats() {
 }
 
 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";
 }
 
 //----------------------------------------------------------------------------//





More information about the cfe-commits mailing list