Author: Jan Svoboda
Date: 2023-11-06T14:45:04-08:00
New Revision: 4f31d328aa165e559c9f374dc3201657921f150d

URL: 
https://github.com/llvm/llvm-project/commit/4f31d328aa165e559c9f374dc3201657921f150d
DIFF: 
https://github.com/llvm/llvm-project/commit/4f31d328aa165e559c9f374dc3201657921f150d.diff

LOG: [clang] Improve `SourceManager::PrintStats()`

This fixes a typo ("SLocEntry's" -> "SLocEntries"), fixes capitalization 
("Sloc" -> "SLoc") and adds extra information (capacity in bytes of 
`LoadedSLocEntryTable`).

Added: 
    

Modified: 
    clang/lib/Basic/SourceManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/SourceManager.cpp 
b/clang/lib/Basic/SourceManager.cpp
index d627c233a3aa094..37734d3b10e78f7 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;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to