forked from OSchip/llvm-project
Added dump method for global module index.
llvm-svn: 206418
This commit is contained in:
parent
327db80dd5
commit
bcdcc92e2f
|
@ -186,6 +186,9 @@ public:
|
|||
/// \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.
|
||||
|
|
|
@ -349,6 +349,21 @@ void GlobalModuleIndex::printStats() {
|
|||
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.
|
||||
//----------------------------------------------------------------------------//
|
||||
|
|
Loading…
Reference in New Issue