diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-19 16:13:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-19 16:13:54 +0000 |
commit | 5e61fa95196b85281eec655787e9c73267532bd1 (patch) | |
tree | 5571834e7eeec045638ab62c24cb1bcc0eb82fd7 /include/llvm | |
parent | 1d29a6d6c7a7f6203065c003d3d2d002870e38a1 (diff) | |
download | external_llvm-5e61fa95196b85281eec655787e9c73267532bd1.zip external_llvm-5e61fa95196b85281eec655787e9c73267532bd1.tar.gz external_llvm-5e61fa95196b85281eec655787e9c73267532bd1.tar.bz2 |
Add a MachineBasicBlock::getParent() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 9399d56..44cab9e 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -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 @@ public: /// 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; |