diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-06 22:14:06 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-06 22:14:06 +0000 |
commit | d146e7d93e7a122d8c3fc71f8edd2a535ee8edde (patch) | |
tree | 80e63f79cd6135b2f215f3e548aedd36451709e3 | |
parent | 1607bb38b61a889128c014f1e51cf4465512aa04 (diff) | |
download | bcm5719-llvm-d146e7d93e7a122d8c3fc71f8edd2a535ee8edde.tar.gz bcm5719-llvm-d146e7d93e7a122d8c3fc71f8edd2a535ee8edde.zip |
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
-rw-r--r-- | llvm/include/llvm/IR/SymbolTableListTraits.h | 4 | ||||
-rw-r--r-- | llvm/lib/IR/SymbolTableListTraitsImpl.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/IR/SymbolTableListTraits.h b/llvm/include/llvm/IR/SymbolTableListTraits.h index a81ffe8fa0c..de1d1398196 100644 --- a/llvm/include/llvm/IR/SymbolTableListTraits.h +++ b/llvm/include/llvm/IR/SymbolTableListTraits.h @@ -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; } diff --git a/llvm/lib/IR/SymbolTableListTraitsImpl.h b/llvm/lib/IR/SymbolTableListTraitsImpl.h index 10cb76ed31d..8eba24f8300 100644 --- a/llvm/lib/IR/SymbolTableListTraitsImpl.h +++ b/llvm/lib/IR/SymbolTableListTraitsImpl.h @@ -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) { |