/// \brief Print statistics to standard error.
void printStats();
+ /// \brief Print debugging view to standard error.
+ void dump();
+
/// \brief Write a global index into the given
///
/// \param FileMgr The file manager to use to load module files.
std::fprintf(stderr, "\n");
}
+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();
+ else
+ std::fprintf(stderr, "\n");
+ }
+ std::fprintf(stderr, "\n");
+}
+
//----------------------------------------------------------------------------//
// Global module index writer.
//----------------------------------------------------------------------------//