Adjust to ilist changes.
authorChris Lattner <sabre@nondot.org>
Sat, 29 Jan 2005 18:41:12 +0000 (18:41 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 29 Jan 2005 18:41:12 +0000 (18:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure/DSNode.h
include/llvm/CodeGen/MachineBasicBlock.h
include/llvm/CodeGen/MachineFunction.h
lib/VMCore/BasicBlock.cpp
lib/VMCore/Function.cpp
lib/VMCore/Module.cpp

index 8dc39fb73cbf4b37825b753d0fc4e1ee583d71bd..2d707153e12642269030c0fced71d6bedf8ca571 100644 (file)
@@ -369,7 +369,8 @@ struct ilist_traits<DSNode> {
   static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; }
   static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; }
 
-  static DSNode *createNode() { return new DSNode(0,0); }
+  static DSNode *createSentinal() { return new DSNode(0,0); }
+  static void destroySentinal(DSNode *N) { delete N; }
   //static DSNode *createNode(const DSNode &V) { return new DSNode(V); }
 
 
index a7d031bad4b2c8e88564151a8c74455613220ddf..4cf4b35c6604ebfb1f5c39fc3528c12ad9187d08 100644 (file)
@@ -45,7 +45,8 @@ public:
   static void setPrev(MachineInstr* N, MachineInstr* prev) { N->prev = prev; }
   static void setNext(MachineInstr* N, MachineInstr* next) { N->next = next; }
 
-  static MachineInstr* createNode();
+  static MachineInstr* createSentinal();
+  static void destroySentinal(MachineInstr *MI) { delete MI; }
   void addNodeToList(MachineInstr* N);
   void removeNodeFromList(MachineInstr* N);
   void transferNodesFromList(
index 01610c20aa0672068f30a6512ffb26a9e22ca947..ffd941d1112e8deb57bbfff73557d7e3039e0360 100644 (file)
@@ -55,7 +55,8 @@ public:
     N->Next = next;
   }
 
-  static MachineBasicBlock* createNode();
+  static MachineBasicBlock* createSentinal();
+  static void destroySentinal(MachineBasicBlock *MBB) { delete MBB; }
   void addNodeToList(MachineBasicBlock* N);
   void removeNodeFromList(MachineBasicBlock* N);
   void transferNodesFromList(iplist<MachineBasicBlock,
index 25507ce954ed9feec6988de1f1ed26e3760d6742..78753a52366b8db1a62009c2da7e435ea00c07e8 100644 (file)
@@ -48,7 +48,7 @@ namespace {
   };
 }
 
-Instruction *ilist_traits<Instruction>::createNode() {
+Instruction *ilist_traits<Instruction>::createSentinal() {
   return new DummyInst();
 }
 iplist<Instruction> &ilist_traits<Instruction>::getList(BasicBlock *BB) {
index c63b1acdc42d201315d44fa92ada2f2b51a67ef5..770715f67dac2667aeeb3e534fe3c67334c2dfa0 100644 (file)
@@ -20,7 +20,7 @@
 #include "llvm/ADT/StringExtras.h"
 using namespace llvm;
 
-BasicBlock *ilist_traits<BasicBlock>::createNode() {
+BasicBlock *ilist_traits<BasicBlock>::createSentinal() {
   BasicBlock *Ret = new BasicBlock();
   // This should not be garbage monitored.
   LeakDetector::removeGarbageObject(Ret);
@@ -31,7 +31,7 @@ iplist<BasicBlock> &ilist_traits<BasicBlock>::getList(Function *F) {
   return F->getBasicBlockList();
 }
 
-Argument *ilist_traits<Argument>::createNode() {
+Argument *ilist_traits<Argument>::createSentinal() {
   Argument *Ret = new Argument(Type::IntTy);
   // This should not be garbage monitored.
   LeakDetector::removeGarbageObject(Ret);
index 3759cfd85eba13c441dcc3296f66e05820ebfa06..a935bf64b0e46071fb3a9593e36b9aed8c85d6b1 100644 (file)
@@ -28,7 +28,7 @@ using namespace llvm;
 // Methods to implement the globals and functions lists.
 //
 
-Function *ilist_traits<Function>::createNode() {
+Function *ilist_traits<Function>::createSentinal() {
   FunctionType *FTy =
     FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
   Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
@@ -36,7 +36,7 @@ Function *ilist_traits<Function>::createNode() {
   LeakDetector::removeGarbageObject(Ret);
   return Ret;
 }
-GlobalVariable *ilist_traits<GlobalVariable>::createNode() {
+GlobalVariable *ilist_traits<GlobalVariable>::createSentinal() {
   GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false,
                                            GlobalValue::ExternalLinkage);
   // This should not be garbage monitored.