mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 06:06:52 +00: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>
|
template<typename ValueSubClass, typename ItemParentClass>
|
||||||
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
|
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
|
||||||
typedef ilist_traits<ValueSubClass> TraitsClass;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SymbolTableListTraits() {}
|
SymbolTableListTraits() {}
|
||||||
|
|
||||||
|
private:
|
||||||
/// getListOwner - Return the object that owns this list. If this is a list
|
/// getListOwner - Return the object that owns this list. If this is a list
|
||||||
/// of instructions, it returns the BasicBlock that owns them.
|
/// of instructions, it returns the BasicBlock that owns them.
|
||||||
ItemParentClass *getListOwner() {
|
ItemParentClass *getListOwner() {
|
||||||
@ -58,7 +57,6 @@ public:
|
|||||||
return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr));
|
return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
static ValueSymbolTable *getSymTab(ItemParentClass *Par) {
|
static ValueSymbolTable *getSymTab(ItemParentClass *Par) {
|
||||||
return Par ? toPtr(Par->getValueSymbolTable()) : nullptr;
|
return Par ? toPtr(Par->getValueSymbolTable()) : nullptr;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass>
|
|||||||
if (OldST == NewST) return;
|
if (OldST == NewST) return;
|
||||||
|
|
||||||
// Move all the elements from the old symtab to the new one.
|
// 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 (ItemList.empty()) return;
|
||||||
|
|
||||||
if (OldST) {
|
if (OldST) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user