forked from OSchip/llvm-project
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:
parent
1c2239e9b1
commit
db571c6e44
|
@ -342,6 +342,12 @@ public:
|
||||||
}
|
}
|
||||||
void Deallocate(void *Ptr) const { }
|
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() {
|
PartialDiagnostic::StorageAllocator &getDiagAllocator() {
|
||||||
return DiagAllocator;
|
return DiagAllocator;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue