aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-04-28 04:10:31 +0000
committerTed Kremenek <kremenek@apple.com>2011-04-28 04:10:31 +0000
commit457aaf0692dfb2d9638f383334b81027f637f20c (patch)
tree907b0b5779a322f21885262baec83f160da359e4 /include/clang/Basic/SourceManager.h
parentd7f02df6e949aaf26706bea3ac79ed65ca792a30 (diff)
Enhance clang_getCXTUResourceUsage() to report the amount of memory used by SourceManager's content cache allocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 653142dbee..1907ed5cc6 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -850,6 +850,16 @@ public:
LineTableInfo &getLineTable();
//===--------------------------------------------------------------------===//
+ // Queries for performance analysis.
+ //===--------------------------------------------------------------------===//
+
+ /// Return the total amount of physical memory allocated by the
+ /// ContentCache allocator.
+ size_t getContentCacheSize() const {
+ return ContentCacheAlloc.getTotalMemory();
+ }
+
+ //===--------------------------------------------------------------------===//
// Other miscellaneous methods.
//===--------------------------------------------------------------------===//