]> granicus.if.org Git - clang/commitdiff
Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump...
authorTed Kremenek <kremenek@apple.com>
Mon, 18 Apr 2011 22:47:07 +0000 (22:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 18 Apr 2011 22:47:07 +0000 (22:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129729 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTContext.h

index 63d6d0096b4ebe3891b8b0c113b89b1174efdebe..820c5a288d5abf745dbcf770a3887dbc1aed79e2 100644 (file)
@@ -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;
   }