aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode/Archive.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-28 21:51:04 +0000
committerDan Gohman <gohman@apple.com>2008-07-28 21:51:04 +0000
commit2fcbc7e8303dfee61147d76bbf16ed0297133c77 (patch)
tree7ec1a6f6b2a8a37e054b84505502b3346c6680c7 /include/llvm/Bitcode/Archive.h
parent7fb99c747552e43a9adc0bdc2396fa74374978be (diff)
downloadexternal_llvm-2fcbc7e8303dfee61147d76bbf16ed0297133c77.tar.gz
external_llvm-2fcbc7e8303dfee61147d76bbf16ed0297133c77.tar.bz2
external_llvm-2fcbc7e8303dfee61147d76bbf16ed0297133c77.zip
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
Diffstat (limited to 'include/llvm/Bitcode/Archive.h')
-rw-r--r--include/llvm/Bitcode/Archive.h16
1 files changed, 2 insertions, 14 deletions
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 <map>
#include <set>
@@ -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<ArchiveMember> {
/// @name Types
/// @{
public:
@@ -165,22 +166,9 @@ class ArchiveMember {
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)