diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-04-18 22:47:04 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-04-18 22:47:04 +0000 |
commit | 97f55d6ffd548d1777d790c84b358030682f9de2 (patch) | |
tree | 90537bae813e7dfbd681ddaa14c71c7bf6291178 /lib/Basic/IdentifierTable.cpp | |
parent | b5fbb8931466eeab70a30a27a8d5f385472305a1 (diff) |
Add SelectorTable::getTotalMemory() to allow clients to query how much memory is used by selectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
-rw-r--r-- | lib/Basic/IdentifierTable.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index bbea23ab8d..cb1f55b757 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -433,6 +433,10 @@ static SelectorTableImpl &getSelectorTableImpl(void *P) { return *static_cast<SelectorTableImpl*>(P); } +size_t SelectorTable::getTotalMemory() const { + SelectorTableImpl &SelTabImpl = getSelectorTableImpl(Impl); + return SelTabImpl.Allocator.getTotalMemory(); +} Selector SelectorTable::getSelector(unsigned nKeys, IdentifierInfo **IIV) { if (nKeys < 2) |