mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 19:07:53 +08:00
Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump allocated for declarations, statements, and types.
llvm-svn: 129729
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user