summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-04-18 22:47:04 +0000
committerTed Kremenek <kremenek@apple.com>2011-04-18 22:47:04 +0000
commit1c2239e9b165aa1d7cfe51f8a1a8522644de0822 (patch)
tree39fe7284f38b8235b59839694db2b71e72f0b313 /clang/lib/Basic/IdentifierTable.cpp
parent28af26d878126d92d8f124cba5143dbd7e4233cd (diff)
downloadbcm5719-llvm-1c2239e9b165aa1d7cfe51f8a1a8522644de0822.tar.gz
bcm5719-llvm-1c2239e9b165aa1d7cfe51f8a1a8522644de0822.zip
Add SelectorTable::getTotalMemory() to allow clients to query how much memory is used by selectors.
llvm-svn: 129728
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r--clang/lib/Basic/IdentifierTable.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index bbea23ab8da..cb1f55b7577 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud