From fed90b6d097d50881afb45e4d79f430db66dd741 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 28 Jul 2008 21:51:04 +0000 Subject: Fold the useful features of alist and alist_node into ilist, and a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/GlobalAlias.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'include/llvm/GlobalAlias.h') diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h index 7c147eb62a..124cf94fa9 100644 --- a/include/llvm/GlobalAlias.h +++ b/include/llvm/GlobalAlias.h @@ -17,6 +17,7 @@ #include "llvm/GlobalValue.h" #include "llvm/OperandTraits.h" +#include "llvm/ADT/ilist_node.h" namespace llvm { @@ -26,23 +27,13 @@ class PointerType; template class SymbolTableListTraits; -class GlobalAlias : public GlobalValue { +class GlobalAlias : public GlobalValue, public ilist_node { friend class SymbolTableListTraits; void operator=(const GlobalAlias &); // Do not implement GlobalAlias(const GlobalAlias &); // Do not implement void setParent(Module *parent); - GlobalAlias *Prev, *Next; - void setNext(GlobalAlias *N) { Next = N; } - void setPrev(GlobalAlias *N) { Prev = N; } - - // getNext/Prev - Return the next or previous alias in the list. - GlobalAlias *getNext() { return Next; } - const GlobalAlias *getNext() const { return Next; } - GlobalAlias *getPrev() { return Prev; } - const GlobalAlias *getPrev() const { return Prev; } - public: // allocate space for exactly one operand void *operator new(size_t s) { -- cgit v1.2.3