diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-04-18 22:47:07 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-04-18 22:47:07 +0000 |
commit | db571c6e444bb3a34dd32630f13bd74c78e3b589 (patch) | |
tree | 4b8a54f77164449d6731f15828fd4f5089d4f627 /clang | |
parent | 1c2239e9b165aa1d7cfe51f8a1a8522644de0822 (diff) | |
download | bcm5719-llvm-db571c6e444bb3a34dd32630f13bd74c78e3b589.tar.gz bcm5719-llvm-db571c6e444bb3a34dd32630f13bd74c78e3b589.zip |
Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump allocated for declarations, statements, and types.
llvm-svn: 129729
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/ASTContext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 63d6d0096b4..820c5a288d5 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -342,6 +342,12 @@ public: } void Deallocate(void *Ptr) const { } + /// Return the total amount of physical memory allocated for representing + /// AST nodes and type information. + size_t getTotalAllocatedMemory() const { + return BumpAlloc.getTotalMemory(); + } + PartialDiagnostic::StorageAllocator &getDiagAllocator() { return DiagAllocator; } |