[llvm-commits] CVS: llvm/include/llvm/BasicBlock.h Function.h Module.h
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 29 10:41:13 PST 2005
Changes in directory llvm/include/llvm:
BasicBlock.h updated: 1.45 -> 1.46
Function.h updated: 1.57 -> 1.58
Module.h updated: 1.55 -> 1.56
---
Log message:
Adjust to changes in ilist
---
Diffs of the changes: (+15 -11)
BasicBlock.h | 5 +++--
Function.h | 11 ++++++-----
Module.h | 10 ++++++----
3 files changed, 15 insertions(+), 11 deletions(-)
Index: llvm/include/llvm/BasicBlock.h
diff -u llvm/include/llvm/BasicBlock.h:1.45 llvm/include/llvm/BasicBlock.h:1.46
--- llvm/include/llvm/BasicBlock.h:1.45 Mon Nov 15 13:02:35 2004
+++ llvm/include/llvm/BasicBlock.h Sat Jan 29 12:41:00 2005
@@ -40,8 +40,9 @@
template<> struct ilist_traits<Instruction>
: public SymbolTableListTraits<Instruction, BasicBlock, Function> {
- // createNode is used to create a node that marks the end of the list...
- static Instruction *createNode();
+ // createSentinal is used to create a node that marks the end of the list...
+ static Instruction *createSentinal();
+ static void destroySentinal(Instruction *I) { delete I; }
static iplist<Instruction> &getList(BasicBlock *BB);
};
Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.57 llvm/include/llvm/Function.h:1.58
--- llvm/include/llvm/Function.h:1.57 Fri Jan 7 01:40:20 2005
+++ llvm/include/llvm/Function.h Sat Jan 29 12:41:00 2005
@@ -31,17 +31,18 @@
template<> struct ilist_traits<BasicBlock>
: public SymbolTableListTraits<BasicBlock, Function, Function> {
- // createNode is used to create a node that marks the end of the list...
- static BasicBlock *createNode();
-
+ // createSentinal is used to create a node that marks the end of the list...
+ static BasicBlock *createSentinal();
+ static void destroySentinal(BasicBlock *BB) { delete BB; }
static iplist<BasicBlock> &getList(Function *F);
};
template<> struct ilist_traits<Argument>
: public SymbolTableListTraits<Argument, Function, Function> {
- // createNode is used to create a node that marks the end of the list...
- static Argument *createNode();
+ // createSentinal is used to create a node that marks the end of the list...
+ static Argument *createSentinal();
+ static void destroySentinal(Argument *A) { delete A; }
static iplist<Argument> &getList(Function *F);
};
Index: llvm/include/llvm/Module.h
diff -u llvm/include/llvm/Module.h:1.55 llvm/include/llvm/Module.h:1.56
--- llvm/include/llvm/Module.h:1.55 Fri Nov 19 10:25:42 2004
+++ llvm/include/llvm/Module.h Sat Jan 29 12:41:00 2005
@@ -32,14 +32,16 @@
template<> struct ilist_traits<Function>
: public SymbolTableListTraits<Function, Module, Module> {
- // createNode is used to create a node that marks the end of the list...
- static Function *createNode();
+ // createSentinal is used to create a node that marks the end of the list.
+ static Function *createSentinal();
+ static void destroySentinal(Function *F) { delete F; }
static iplist<Function> &getList(Module *M);
};
template<> struct ilist_traits<GlobalVariable>
: public SymbolTableListTraits<GlobalVariable, Module, Module> {
- // createNode is used to create a node that marks the end of the list...
- static GlobalVariable *createNode();
+ // createSentinal is used to create a node that marks the end of the list.
+ static GlobalVariable *createSentinal();
+ static void destroySentinal(GlobalVariable *GV) { delete GV; }
static iplist<GlobalVariable> &getList(Module *M);
};
More information about the llvm-commits
mailing list