From 2fcbc7e8303dfee61147d76bbf16ed0297133c77 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/Bitcode/Archive.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'include/llvm/Bitcode/Archive.h') diff --git a/include/llvm/Bitcode/Archive.h b/include/llvm/Bitcode/Archive.h index 91684c62e2..6ba11531dd 100644 --- a/include/llvm/Bitcode/Archive.h +++ b/include/llvm/Bitcode/Archive.h @@ -18,6 +18,7 @@ #define LLVM_BITCODE_ARCHIVE_H #include "llvm/ADT/ilist.h" +#include "llvm/ADT/ilist_node.h" #include "llvm/System/Path.h" #include #include @@ -39,7 +40,7 @@ class ArchiveMemberHeader; // Internal implementation class /// construct ArchiveMember instances. You should obtain them from the methods /// of the Archive class instead. /// @brief This class represents a single archive member. -class ArchiveMember { +class ArchiveMember : public ilist_node { /// @name Types /// @{ public: @@ -164,23 +165,10 @@ class ArchiveMember { /// @brief Replace contents of archive member with a new file. bool replaceWith(const sys::Path &aFile, std::string* ErrMsg); - /// @} - /// @name ilist methods - do not use - /// @{ - public: - const ArchiveMember *getNext() const { return next; } - const ArchiveMember *getPrev() const { return prev; } - ArchiveMember *getNext() { return next; } - ArchiveMember *getPrev() { return prev; } - void setPrev(ArchiveMember* p) { prev = p; } - void setNext(ArchiveMember* n) { next = n; } - /// @} /// @name Data /// @{ private: - ArchiveMember* next; ///< Pointer to next archive member - ArchiveMember* prev; ///< Pointer to previous archive member Archive* parent; ///< Pointer to parent archive sys::PathWithStatus path; ///< Path of file containing the member sys::FileStatus info; ///< Status info (size,mode,date) -- cgit v1.2.3