llvm.org GIT mirror llvm / 3cf8e68
Adjust to ilist changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
6 changed file(s) with 11 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
368368 static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; }
369369 static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; }
370370
371 static DSNode *createNode() { return new DSNode(0,0); }
371 static DSNode *createSentinal() { return new DSNode(0,0); }
372 static void destroySentinal(DSNode *N) { delete N; }
372373 //static DSNode *createNode(const DSNode &V) { return new DSNode(V); }
373374
374375
4444 static void setPrev(MachineInstr* N, MachineInstr* prev) { N->prev = prev; }
4545 static void setNext(MachineInstr* N, MachineInstr* next) { N->next = next; }
4646
47 static MachineInstr* createNode();
47 static MachineInstr* createSentinal();
48 static void destroySentinal(MachineInstr *MI) { delete MI; }
4849 void addNodeToList(MachineInstr* N);
4950 void removeNodeFromList(MachineInstr* N);
5051 void transferNodesFromList(
5454 N->Next = next;
5555 }
5656
57 static MachineBasicBlock* createNode();
57 static MachineBasicBlock* createSentinal();
58 static void destroySentinal(MachineBasicBlock *MBB) { delete MBB; }
5859 void addNodeToList(MachineBasicBlock* N);
5960 void removeNodeFromList(MachineBasicBlock* N);
6061 void transferNodesFromList(iplist
4747 };
4848 }
4949
50 Instruction *ilist_traits::createNode() {
50 Instruction *ilist_traits::createSentinal() {
5151 return new DummyInst();
5252 }
5353 iplist &ilist_traits::getList(BasicBlock *BB) {
1919 #include "llvm/ADT/StringExtras.h"
2020 using namespace llvm;
2121
22 BasicBlock *ilist_traits::createNode() {
22 BasicBlock *ilist_traits::createSentinal() {
2323 BasicBlock *Ret = new BasicBlock();
2424 // This should not be garbage monitored.
2525 LeakDetector::removeGarbageObject(Ret);
3030 return F->getBasicBlockList();
3131 }
3232
33 Argument *ilist_traits::createNode() {
33 Argument *ilist_traits::createSentinal() {
3434 Argument *Ret = new Argument(Type::IntTy);
3535 // This should not be garbage monitored.
3636 LeakDetector::removeGarbageObject(Ret);
2727 // Methods to implement the globals and functions lists.
2828 //
2929
30 Function *ilist_traits::createNode() {
30 Function *ilist_traits::createSentinal() {
3131 FunctionType *FTy =
3232 FunctionType::get(Type::VoidTy, std::vector(), false);
3333 Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
3535 LeakDetector::removeGarbageObject(Ret);
3636 return Ret;
3737 }
38 GlobalVariable *ilist_traits::createNode() {
38 GlobalVariable *ilist_traits::createSentinal() {
3939 GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false,
4040 GlobalValue::ExternalLinkage);
4141 // This should not be garbage monitored.