[llvm] r249476 - IR: Remove unnecessary TraitsClass typedef, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 15:14:07 PDT 2015
Author: dexonsmith
Date: Tue Oct 6 17:14:06 2015
New Revision: 249476
URL: http://llvm.org/viewvc/llvm-project?rev=249476&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/IR/SymbolTableListTraits.h
llvm/trunk/lib/IR/SymbolTableListTraitsImpl.h
Modified: llvm/trunk/include/llvm/IR/SymbolTableListTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/SymbolTableListTraits.h?rev=249476&r1=249475&r2=249476&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/SymbolTableListTraits.h (original)
+++ llvm/trunk/include/llvm/IR/SymbolTableListTraits.h Tue Oct 6 17:14:06 2015
@@ -39,11 +39,10 @@ template <typename Ty> struct ilist_trai
//
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;
}
Modified: llvm/trunk/lib/IR/SymbolTableListTraitsImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/SymbolTableListTraitsImpl.h?rev=249476&r1=249475&r2=249476&view=diff
==============================================================================
--- llvm/trunk/lib/IR/SymbolTableListTraitsImpl.h (original)
+++ llvm/trunk/lib/IR/SymbolTableListTraitsImpl.h Tue Oct 6 17:14:06 2015
@@ -41,7 +41,7 @@ void SymbolTableListTraits<ValueSubClass
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) {
More information about the llvm-commits
mailing list