From: Duncan P. N. Exon Smith Date: Tue, 6 Oct 2015 22:14:06 +0000 (+0000) Subject: IR: Remove unnecessary TraitsClass typedef, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c050416f050ffd637777d94b9f1a51bbad28b41;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249476 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/SymbolTableListTraits.h b/include/llvm/IR/SymbolTableListTraits.h index a81ffe8fa0c..de1d1398196 100644 --- a/include/llvm/IR/SymbolTableListTraits.h +++ b/include/llvm/IR/SymbolTableListTraits.h @@ -39,11 +39,10 @@ template struct ilist_traits; // template class SymbolTableListTraits : public ilist_default_traits { - typedef ilist_traits 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/lib/IR/SymbolTableListTraitsImpl.h b/lib/IR/SymbolTableListTraitsImpl.h index 10cb76ed31d..8eba24f8300 100644 --- a/lib/IR/SymbolTableListTraitsImpl.h +++ b/lib/IR/SymbolTableListTraitsImpl.h @@ -41,7 +41,7 @@ void SymbolTableListTraits if (OldST == NewST) return; // Move all the elements from the old symtab to the new one. - iplist &ItemList = TraitsClass::getList(getListOwner()); + iplist &ItemList = getList(getListOwner()); if (ItemList.empty()) return; if (OldST) {