mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 12:24:34 +00:00
Add a helper method
llvm-svn: 22768
This commit is contained in:
parent
879c4db070
commit
4e2d62ba5d
@ -102,6 +102,14 @@ void BasicBlock::eraseFromParent() {
|
||||
getParent()->getBasicBlockList().erase(this);
|
||||
}
|
||||
|
||||
/// moveBefore - Unlink this instruction from its current function and
|
||||
/// insert it into the function that MovePos lives in, right before
|
||||
/// MovePos.
|
||||
void BasicBlock::moveBefore(BasicBlock *MovePos) {
|
||||
MovePos->getParent()->getBasicBlockList().splice(MovePos,
|
||||
getParent()->getBasicBlockList(), this);
|
||||
}
|
||||
|
||||
|
||||
TerminatorInst *BasicBlock::getTerminator() {
|
||||
if (InstList.empty()) return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user