Skip to content

Commit

Permalink
[clang] Improve SourceManager::PrintStats()
Browse files Browse the repository at this point in the history
This fixes a typo ("SLocEntry's" -> "SLocEntries"), fixes capitalization ("Sloc" -> "SLoc") and adds extra information (capacity in bytes of `LoadedSLocEntryTable`).
  • Loading branch information
jansvoboda11 committed Nov 6, 2023
1 parent ad584a2 commit 4f31d32
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions clang/lib/Basic/SourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2121,14 +2121,16 @@ void SourceManager::PrintStats() const {
llvm::errs() << "\n*** Source Manager Stats:\n";
llvm::errs() << FileInfos.size() << " files mapped, " << MemBufferInfos.size()
<< " mem buffers mapped.\n";
llvm::errs() << LocalSLocEntryTable.size() << " local SLocEntry's allocated ("
llvm::errs() << LocalSLocEntryTable.size() << " local SLocEntries allocated ("
<< llvm::capacity_in_bytes(LocalSLocEntryTable)
<< " bytes of capacity), "
<< NextLocalOffset << "B of Sloc address space used.\n";
<< " bytes of capacity), " << NextLocalOffset
<< "B of SLoc address space used.\n";
llvm::errs() << LoadedSLocEntryTable.size()
<< " loaded SLocEntries allocated, "
<< " loaded SLocEntries allocated ("
<< llvm::capacity_in_bytes(LoadedSLocEntryTable)
<< " bytes of capacity), "
<< MaxLoadedOffset - CurrentLoadedOffset
<< "B of Sloc address space used.\n";
<< "B of SLoc address space used.\n";

unsigned NumLineNumsComputed = 0;
unsigned NumFileBytesMapped = 0;
Expand Down

0 comments on commit 4f31d32

Please sign in to comment.