No classes are specializing the symbol table traits, so no need to look
through a typedef for class API. Make a few more functions private
since only SymbolTableListTraits should be using them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249476
91177308-0d34-0410-b5e6-
96231b3b80d8
//
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
- typedef ilist_traits<ValueSubClass> TraitsClass;
-
public:
SymbolTableListTraits() {}
+private:
/// getListOwner - Return the object that owns this list. If this is a list
/// of instructions, it returns the BasicBlock that owns them.
ItemParentClass *getListOwner() {
return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr));
}
-private:
static ValueSymbolTable *getSymTab(ItemParentClass *Par) {
return Par ? toPtr(Par->getValueSymbolTable()) : nullptr;
}
if (OldST == NewST) return;
// Move all the elements from the old symtab to the new one.
- iplist<ValueSubClass> &ItemList = TraitsClass::getList(getListOwner());
+ iplist<ValueSubClass> &ItemList = getList(getListOwner());
if (ItemList.empty()) return;
if (OldST) {