diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-11-06 14:44:32 -0800 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-11-06 14:45:04 -0800 |
commit | 4f31d328aa165e559c9f374dc3201657921f150d (patch) | |
tree | b49a570b87c4be56ac6d21805ddac90663af7d82 /clang/lib/Basic/SourceManager.cpp | |
parent | ad584a27f297051482f1fe6d19db8a99c954e7d0 (diff) | |
download | llvm-4f31d328aa165e559c9f374dc3201657921f150d.zip llvm-4f31d328aa165e559c9f374dc3201657921f150d.tar.gz llvm-4f31d328aa165e559c9f374dc3201657921f150d.tar.bz2 |
[clang] Improve `SourceManager::PrintStats()`
This fixes a typo ("SLocEntry's" -> "SLocEntries"), fixes capitalization ("Sloc" -> "SLoc") and adds extra information (capacity in bytes of `LoadedSLocEntryTable`).
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index d627c23..37734d3 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -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; |