[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h MachineFunction.h

Tanya Brethour tbrethou at cs.uiuc.edu
Mon May 24 02:16:01 PDT 2004


Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.33 -> 1.34
MachineFunction.h updated: 1.34 -> 1.35

---
Log message:

Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.


---
Diffs of the changes:  (+6 -5)

Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.33 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.34
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.33	Mon May 24 01:11:51 2004
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h	Mon May 24 02:14:33 2004
@@ -71,7 +71,8 @@
                                                 Number(-1), Parent(0) {
     Insts.parent = this;
   }
-  ~MachineBasicBlock() {}
+
+  ~MachineBasicBlock();
   
   /// getBasicBlock - Return the LLVM basic block that this instance
   /// corresponded to originally.


Index: llvm/include/llvm/CodeGen/MachineFunction.h
diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.34 llvm/include/llvm/CodeGen/MachineFunction.h:1.35
--- llvm/include/llvm/CodeGen/MachineFunction.h:1.34	Mon May 24 01:11:51 2004
+++ llvm/include/llvm/CodeGen/MachineFunction.h	Mon May 24 02:14:35 2004
@@ -28,10 +28,10 @@
 class ilist_traits<MachineBasicBlock> {
   // this is only set by the MachineFunction owning the ilist
   friend class MachineFunction;
-  MachineFunction* parent;
+  MachineFunction* Parent;
   
 public:
-  ilist_traits<MachineBasicBlock>() : parent(0) { }
+  ilist_traits<MachineBasicBlock>() : Parent(0) { }
   
   static MachineBasicBlock* getPrev(MachineBasicBlock* N) { return N->Prev; }
   static MachineBasicBlock* getNext(MachineBasicBlock* N) { return N->Next; }
@@ -68,7 +68,7 @@
   const TargetMachine &Target;
 
   // List of machine basic blocks in function
-  iplist<MachineBasicBlock> BasicBlocks;
+  ilist<MachineBasicBlock> BasicBlocks;
 
   // Keeping track of mapping from SSA values to registers
   SSARegMap *SSARegMapping;
@@ -145,7 +145,7 @@
   static MachineFunction& get(const Function *F);
 
   // Provide accessors for the MachineBasicBlock list...
-  typedef iplist<MachineBasicBlock> BasicBlockListType;
+  typedef ilist<MachineBasicBlock> BasicBlockListType;
   typedef BasicBlockListType::iterator iterator;
   typedef BasicBlockListType::const_iterator const_iterator;
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;





More information about the llvm-commits mailing list