diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-29 18:41:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-29 18:41:00 +0000 |
commit | f84ecca5f3a6a5a2d237f36b056a360f912d098f (patch) | |
tree | 62c14e51930193affb17cc7dac9a06f51cc50157 | |
parent | 02ccc2d7a08e99e3a2a70adae16275442b219b60 (diff) | |
download | bcm5719-llvm-f84ecca5f3a6a5a2d237f36b056a360f912d098f.tar.gz bcm5719-llvm-f84ecca5f3a6a5a2d237f36b056a360f912d098f.zip |
Adjust to changes in ilist
llvm-svn: 19922
-rw-r--r-- | llvm/include/llvm/BasicBlock.h | 5 | ||||
-rw-r--r-- | llvm/include/llvm/Function.h | 11 | ||||
-rw-r--r-- | llvm/include/llvm/Module.h | 10 |
3 files changed, 15 insertions, 11 deletions
diff --git a/llvm/include/llvm/BasicBlock.h b/llvm/include/llvm/BasicBlock.h index ed9794207a3..dc3ef1bcccb 100644 --- a/llvm/include/llvm/BasicBlock.h +++ b/llvm/include/llvm/BasicBlock.h @@ -40,8 +40,9 @@ template <class Ptr, class USE_iterator> class PredIterator; 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); }; diff --git a/llvm/include/llvm/Function.h b/llvm/include/llvm/Function.h index a4545a79ab1..88d7d3457f6 100644 --- a/llvm/include/llvm/Function.h +++ b/llvm/include/llvm/Function.h @@ -31,17 +31,18 @@ class FunctionType; 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); }; diff --git a/llvm/include/llvm/Module.h b/llvm/include/llvm/Module.h index 846b47f0576..c53ee4eb9a3 100644 --- a/llvm/include/llvm/Module.h +++ b/llvm/include/llvm/Module.h @@ -32,14 +32,16 @@ class SymbolTable; 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); }; |