mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user