summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index f2903e985d8..68c58f70813 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1598,3 +1598,11 @@ SourceManager::MemoryBufferSizes SourceManager::getMemoryBufferSizes() const {
return MemoryBufferSizes(malloc_bytes, mmap_bytes);
}
+size_t SourceManager::getDataStructureSizes() const {
+ return MemBufferInfos.capacity()
+ + LocalSLocEntryTable.capacity()
+ + LoadedSLocEntryTable.capacity()
+ + SLocEntryLoaded.capacity()
+ + FileInfos.getMemorySize()
+ + OverriddenFiles.getMemorySize();
+}
OpenPOWER on IntegriCloud