aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-29 18:41:12 +0000
committerChris Lattner <sabre@nondot.org>2005-01-29 18:41:12 +0000
commit3cf8e6857e1e5545048fc6fb6d834d50a7b7cf8e (patch)
tree235c7be41422adfe5d7047fade45386df6eeb31b
parent38653f0ac83b793142cd0f3000ba5b1667b08a80 (diff)
downloadexternal_llvm-3cf8e6857e1e5545048fc6fb6d834d50a7b7cf8e.zip
external_llvm-3cf8e6857e1e5545048fc6fb6d834d50a7b7cf8e.tar.gz
external_llvm-3cf8e6857e1e5545048fc6fb6d834d50a7b7cf8e.tar.bz2
Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/DataStructure/DSNode.h3
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h3
-rw-r--r--include/llvm/CodeGen/MachineFunction.h3
-rw-r--r--lib/VMCore/BasicBlock.cpp2
-rw-r--r--lib/VMCore/Function.cpp4
-rw-r--r--lib/VMCore/Module.cpp4
6 files changed, 11 insertions, 8 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h
index 8dc39fb..2d70715 100644
--- a/include/llvm/Analysis/DataStructure/DSNode.h
+++ b/include/llvm/Analysis/DataStructure/DSNode.h
@@ -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); }
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index a7d031b..4cf4b35 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -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(
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 01610c2..ffd941d 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -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,
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 25507ce..78753a5 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -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) {
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index c63b1ac..770715f 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -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);
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 3759cfd..a935bf6 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -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.