diff --git a/include/llvm/ADT/ilist b/include/llvm/ADT/ilist index f5b9e1d5f85..5c25bbd442b 100644 --- a/include/llvm/ADT/ilist +++ b/include/llvm/ADT/ilist @@ -60,8 +60,8 @@ struct ilist_traits { static NodeTy *createNode(const NodeTy &V) { return new NodeTy(V); } - static NodeTy *createSentinal() { return new NodeTy(); } - static void destroySentinal(NodeTy *N) { delete N; } + static NodeTy *createSentinel() { return new NodeTy(); } + static void destroySentinel(NodeTy *N) { delete N; } void addNodeToList(NodeTy *NTy) {} void removeNodeFromList(NodeTy *NTy) {} @@ -302,11 +302,11 @@ public: typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; - iplist() : Head(Traits::createSentinal()), Tail(Head) { + iplist() : Head(Traits::createSentinel()), Tail(Head) { setNext(Head, 0); setPrev(Head, 0); } - ~iplist() { clear(); Traits::destroySentinal(Tail); } + ~iplist() { clear(); Traits::destroySentinel(Tail); } // Iterator creation methods. iterator begin() { return iterator(Head); } diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index 2d707153e12..27e1a5077c4 100644 --- a/include/llvm/Analysis/DataStructure/DSNode.h +++ b/include/llvm/Analysis/DataStructure/DSNode.h @@ -369,8 +369,8 @@ struct ilist_traits { static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; } static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; } - static DSNode *createSentinal() { return new DSNode(0,0); } - static void destroySentinal(DSNode *N) { delete N; } + static DSNode *createSentinel() { return new DSNode(0,0); } + static void destroySentinel(DSNode *N) { delete N; } //static DSNode *createNode(const DSNode &V) { return new DSNode(V); } diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index dc3ef1bcccb..2b1c3e0eea7 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -40,9 +40,9 @@ template class PredIterator; template<> struct ilist_traits : public SymbolTableListTraits { - // createSentinal is used to create a node that marks the end of the list... - static Instruction *createSentinal(); - static void destroySentinal(Instruction *I) { delete I; } + // createSentinel is used to create a node that marks the end of the list... + static Instruction *createSentinel(); + static void destroySentinel(Instruction *I) { delete I; } static iplist &getList(BasicBlock *BB); }; diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 88d7d3457f6..6c1f4692187 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -31,18 +31,18 @@ class FunctionType; template<> struct ilist_traits : public SymbolTableListTraits { - // createSentinal is used to create a node that marks the end of the list... - static BasicBlock *createSentinal(); - static void destroySentinal(BasicBlock *BB) { delete BB; } + // createSentinel is used to create a node that marks the end of the list... + static BasicBlock *createSentinel(); + static void destroySentinel(BasicBlock *BB) { delete BB; } static iplist &getList(Function *F); }; template<> struct ilist_traits : public SymbolTableListTraits { - // createSentinal is used to create a node that marks the end of the list... - static Argument *createSentinal(); - static void destroySentinal(Argument *A) { delete A; } + // createSentinel is used to create a node that marks the end of the list... + static Argument *createSentinel(); + static void destroySentinel(Argument *A) { delete A; } static iplist &getList(Function *F); }; diff --git a/include/llvm/Module.h b/include/llvm/Module.h index c53ee4eb9a3..61ba60f08ed 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -32,16 +32,16 @@ class SymbolTable; template<> struct ilist_traits : public SymbolTableListTraits { - // createSentinal is used to create a node that marks the end of the list. - static Function *createSentinal(); - static void destroySentinal(Function *F) { delete F; } + // createSentinel is used to create a node that marks the end of the list. + static Function *createSentinel(); + static void destroySentinel(Function *F) { delete F; } static iplist &getList(Module *M); }; template<> struct ilist_traits : public SymbolTableListTraits { - // createSentinal is used to create a node that marks the end of the list. - static GlobalVariable *createSentinal(); - static void destroySentinal(GlobalVariable *GV) { delete GV; } + // createSentinel is used to create a node that marks the end of the list. + static GlobalVariable *createSentinel(); + static void destroySentinel(GlobalVariable *GV) { delete GV; } static iplist &getList(Module *M); }; diff --git a/include/llvm/Use.h b/include/llvm/Use.h index 3eeea92e912..26923a26dad 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -84,12 +84,12 @@ struct ilist_traits { static void setPrev(Use *N, Use *Prev) { N->UseLinks.Prev = Prev; } static void setNext(Use *N, Use *Next) { N->UseLinks.Next = Next; } - /// createSentinal - this is used to create the end marker for the use list. + /// createSentinel - this is used to create the end marker for the use list. /// Note that we only allocate a UseLinks structure, which is just enough to /// hold the next/prev pointers. This saves us 8 bytes of memory for every /// Value allocated. - static Use *createSentinal() { return (Use*)new Use::NextPrevPtrs(); } - static void destroySentinal(Use *S) { delete (Use::NextPrevPtrs*)S; } + static Use *createSentinel() { return (Use*)new Use::NextPrevPtrs(); } + static void destroySentinel(Use *S) { delete (Use::NextPrevPtrs*)S; } void addNodeToList(Use *NTy) {} void removeNodeFromList(Use *NTy) {} diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index a69d1580a35..6774dde9ab3 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -46,7 +46,7 @@ void ilist_traits::removeNodeFromList(MachineBasicBlock* N) { } -MachineInstr* ilist_traits::createSentinal() { +MachineInstr* ilist_traits::createSentinel() { MachineInstr* dummy = new MachineInstr(0, 0); LeakDetector::removeGarbageObject(dummy); return dummy; diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 903346d9146..d49a1ddb4b1 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -90,7 +90,7 @@ FunctionPass *llvm::createMachineCodeDeleter() { // MachineFunction implementation //===---------------------------------------------------------------------===// -MachineBasicBlock* ilist_traits::createSentinal() { +MachineBasicBlock* ilist_traits::createSentinel() { MachineBasicBlock* dummy = new MachineBasicBlock(); LeakDetector::removeGarbageObject(dummy); return dummy; diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index 78753a52366..87b9ddd3808 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -48,7 +48,7 @@ namespace { }; } -Instruction *ilist_traits::createSentinal() { +Instruction *ilist_traits::createSentinel() { return new DummyInst(); } iplist &ilist_traits::getList(BasicBlock *BB) { diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 770715f67da..19f437aeb88 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::createSentinal() { +BasicBlock *ilist_traits::createSentinel() { BasicBlock *Ret = new BasicBlock(); // This should not be garbage monitored. LeakDetector::removeGarbageObject(Ret); @@ -31,7 +31,7 @@ iplist &ilist_traits::getList(Function *F) { return F->getBasicBlockList(); } -Argument *ilist_traits::createSentinal() { +Argument *ilist_traits::createSentinel() { 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 a935bf64b0e..0c005494e15 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::createSentinal() { +Function *ilist_traits::createSentinel() { FunctionType *FTy = FunctionType::get(Type::VoidTy, std::vector(), false); Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage); @@ -36,7 +36,7 @@ Function *ilist_traits::createSentinal() { LeakDetector::removeGarbageObject(Ret); return Ret; } -GlobalVariable *ilist_traits::createSentinal() { +GlobalVariable *ilist_traits::createSentinel() { GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false, GlobalValue::ExternalLinkage); // This should not be garbage monitored.