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
diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp
index bbea23a..cb1f55b 100644
--- a/lib/Basic/IdentifierTable.cpp
+++ b/lib/Basic/IdentifierTable.cpp
@@ -433,6 +433,10 @@
   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)