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:
parent
46a6922156
commit
31a36f151b
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user