1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

IR: Remove unnecessary TraitsClass typedef, NFC

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.

llvm-svn: 249476
This commit is contained in:
Duncan P. N. Exon Smith 2015-10-06 22:14:06 +00:00
parent 46a6922156
commit 31a36f151b
2 changed files with 2 additions and 4 deletions

View File

@ -39,11 +39,10 @@ template <typename Ty> struct ilist_traits;
//
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() {
@ -58,7 +57,6 @@ public:
return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr));
}
private:
static ValueSymbolTable *getSymTab(ItemParentClass *Par) {
return Par ? toPtr(Par->getValueSymbolTable()) : nullptr;
}

View File

@ -41,7 +41,7 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass>
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) {