Add SelectorTable::getTotalMemory() to allow clients to query how much memory is used by selectors.
llvm-svn: 129728
This commit is contained in:
parent
28af26d878
commit
1c2239e9b1
|
@ -624,6 +624,9 @@ public:
|
|||
return Selector(ID, 0);
|
||||
}
|
||||
|
||||
/// Return the total amount of memory allocated for managing selectors.
|
||||
size_t getTotalMemory() const;
|
||||
|
||||
/// constructSetterName - Return the setter name for the given
|
||||
/// identifier, i.e. "set" + Name where the initial character of Name
|
||||
/// has been capitalized.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue