aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 9399d56b76..44cab9e9e3 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;