aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-05-24 06:11:51 +0000
committerTanya Lattner <tonic@nondot.org>2004-05-24 06:11:51 +0000
commit792699c46ef9bfc47dd459bbfa7e71bcb2cee29a (patch)
tree09579fa1fb5054e308cfb202d2c63d643d9b9120 /include/llvm/CodeGen/MachineBasicBlock.h
parent2b90565e3df82377eaadff30ac0bc5fbb54e91e7 (diff)
Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
to set the parent when a MachineBasicBlock is added to a MachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index a035ba1477..4dfda90ae8 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -64,10 +64,11 @@ public:
std::vector<MachineBasicBlock *> Predecessors;
std::vector<MachineBasicBlock *> Successors;
int Number;
+ MachineFunction *Parent;
public:
MachineBasicBlock(const BasicBlock *bb = 0) : Prev(0), Next(0), BB(bb),
- Number(-1) {
+ Number(-1), Parent(0) {
Insts.parent = this;
}
~MachineBasicBlock() {}
@@ -79,8 +80,8 @@ public:
/// getParent - Return the MachineFunction containing this basic block.
///
- const MachineFunction *getParent() const;
- MachineFunction *getParent();
+ const MachineFunction *getParent() const { return Parent; }
+ MachineFunction *getParent() { return Parent; }
typedef ilist<MachineInstr>::iterator iterator;
typedef ilist<MachineInstr>::const_iterator const_iterator;