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

Chris Lattner lattner at cs.uiuc.edu
Thu Feb 19 10:17:02 PST 2004


Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.20 -> 1.21

---
Log message:

Add a MachineBasicBlock::getParent() method


---
Diffs of the changes:  (+7 -3)

Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.20 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.21
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.20	Wed Feb 18 10:45:22 2004
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h	Thu Feb 19 10:13:54 2004
@@ -19,11 +19,11 @@
 #include <iosfwd>
 
 namespace llvm {
+  class MachineFunction;
 
 // ilist_traits
 template <>
-class ilist_traits<MachineInstr>
-{
+class ilist_traits<MachineInstr> {
   // this is only set by the MachineBasicBlock owning the ilist
   friend class MachineBasicBlock;
   MachineBasicBlock* parent;
@@ -70,7 +70,11 @@
   /// corresponded to originally.
   ///
   const BasicBlock *getBasicBlock() const { return BB; }
-  
+
+  /// getParent - Return the MachineFunction containing this basic block.
+  ///
+  const MachineFunction *getParent() const;
+
   typedef ilist<MachineInstr>::iterator                       iterator;
   typedef ilist<MachineInstr>::const_iterator           const_iterator;
   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;





More information about the llvm-commits mailing list