mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
add method, correct comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f10c17f986
commit
a71965b1ad
@ -109,10 +109,14 @@ public:
|
|||||||
///
|
///
|
||||||
void eraseFromParent();
|
void eraseFromParent();
|
||||||
|
|
||||||
/// moveBefore - Unlink this instruction from its current function and
|
/// moveBefore - Unlink this basic block from its current function and
|
||||||
/// insert it into the function that MovePos lives in, right before
|
/// insert it into the function that MovePos lives in, right before MovePos.
|
||||||
/// MovePos.
|
|
||||||
void moveBefore(BasicBlock *MovePos);
|
void moveBefore(BasicBlock *MovePos);
|
||||||
|
|
||||||
|
/// moveAfter - Unlink this basic block from its current function and
|
||||||
|
/// insert it into the function that MovePos lives in, right after MovePos.
|
||||||
|
void moveAfter(BasicBlock *MovePos);
|
||||||
|
|
||||||
|
|
||||||
/// getSinglePredecessor - If this basic block has a single predecessor block,
|
/// getSinglePredecessor - If this basic block has a single predecessor block,
|
||||||
/// return the block, otherwise return a null pointer.
|
/// return the block, otherwise return a null pointer.
|
||||||
|
@ -103,14 +103,21 @@ void BasicBlock::eraseFromParent() {
|
|||||||
getParent()->getBasicBlockList().erase(this);
|
getParent()->getBasicBlockList().erase(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// moveBefore - Unlink this instruction from its current function and
|
/// moveBefore - Unlink this basic block from its current function and
|
||||||
/// insert it into the function that MovePos lives in, right before
|
/// insert it into the function that MovePos lives in, right before MovePos.
|
||||||
/// MovePos.
|
|
||||||
void BasicBlock::moveBefore(BasicBlock *MovePos) {
|
void BasicBlock::moveBefore(BasicBlock *MovePos) {
|
||||||
MovePos->getParent()->getBasicBlockList().splice(MovePos,
|
MovePos->getParent()->getBasicBlockList().splice(MovePos,
|
||||||
getParent()->getBasicBlockList(), this);
|
getParent()->getBasicBlockList(), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// moveAfter - Unlink this basic block from its current function and
|
||||||
|
/// insert it into the function that MovePos lives in, right after MovePos.
|
||||||
|
void BasicBlock::moveAfter(BasicBlock *MovePos) {
|
||||||
|
Function::iterator I = MovePos;
|
||||||
|
MovePos->getParent()->getBasicBlockList().splice(++I,
|
||||||
|
getParent()->getBasicBlockList(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TerminatorInst *BasicBlock::getTerminator() {
|
TerminatorInst *BasicBlock::getTerminator() {
|
||||||
if (InstList.empty()) return 0;
|
if (InstList.empty()) return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user