mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
add moveBefore/moveAfter helper methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2a4dd68535
commit
c585a3f62a
@ -120,6 +120,18 @@ void MachineBasicBlock::print(std::ostream &OS) const {
|
||||
}
|
||||
}
|
||||
|
||||
void MachineBasicBlock::moveBefore(MachineBasicBlock *NewAfter) {
|
||||
MachineFunction::BasicBlockListType &BBList =getParent()->getBasicBlockList();
|
||||
getParent()->getBasicBlockList().splice(NewAfter, BBList, this);
|
||||
}
|
||||
|
||||
void MachineBasicBlock::moveAfter(MachineBasicBlock *NewBefore) {
|
||||
MachineFunction::BasicBlockListType &BBList =getParent()->getBasicBlockList();
|
||||
MachineFunction::iterator BBI = NewBefore;
|
||||
getParent()->getBasicBlockList().splice(++BBI, BBList, this);
|
||||
}
|
||||
|
||||
|
||||
void MachineBasicBlock::addSuccessor(MachineBasicBlock *succ) {
|
||||
Successors.push_back(succ);
|
||||
succ->addPredecessor(this);
|
||||
|
Loading…
Reference in New Issue
Block a user