Skip to content

Commit 4f31d32

Browse files
committed
[clang] Improve SourceManager::PrintStats()
This fixes a typo ("SLocEntry's" -> "SLocEntries"), fixes capitalization ("Sloc" -> "SLoc") and adds extra information (capacity in bytes of `LoadedSLocEntryTable`).
1 parent ad584a2 commit 4f31d32

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

clang/lib/Basic/SourceManager.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,14 +2121,16 @@ void SourceManager::PrintStats() const {
21212121
llvm::errs() << "\n*** Source Manager Stats:\n";
21222122
llvm::errs() << FileInfos.size() << " files mapped, " << MemBufferInfos.size()
21232123
<< " mem buffers mapped.\n";
2124-
llvm::errs() << LocalSLocEntryTable.size() << " local SLocEntry's allocated ("
2124+
llvm::errs() << LocalSLocEntryTable.size() << " local SLocEntries allocated ("
21252125
<< llvm::capacity_in_bytes(LocalSLocEntryTable)
2126-
<< " bytes of capacity), "
2127-
<< NextLocalOffset << "B of Sloc address space used.\n";
2126+
<< " bytes of capacity), " << NextLocalOffset
2127+
<< "B of SLoc address space used.\n";
21282128
llvm::errs() << LoadedSLocEntryTable.size()
2129-
<< " loaded SLocEntries allocated, "
2129+
<< " loaded SLocEntries allocated ("
2130+
<< llvm::capacity_in_bytes(LoadedSLocEntryTable)
2131+
<< " bytes of capacity), "
21302132
<< MaxLoadedOffset - CurrentLoadedOffset
2131-
<< "B of Sloc address space used.\n";
2133+
<< "B of SLoc address space used.\n";
21322134

21332135
unsigned NumLineNumsComputed = 0;
21342136
unsigned NumFileBytesMapped = 0;

0 commit comments

Comments
 (0)