projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07216ea
)
Add a helper method
author
Chris Lattner
<sabre@nondot.org>
Fri, 12 Aug 2005 22:14:06 +0000
(22:14 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 12 Aug 2005 22:14:06 +0000
(22:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22768
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/BasicBlock.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/BasicBlock.cpp
b/lib/VMCore/BasicBlock.cpp
index 66344db1501c1ef216b82a4c1b0bc747a50df967..ab7798c3866e91a82b673516ce7ea2af587114d6 100644
(file)
--- a/
lib/VMCore/BasicBlock.cpp
+++ b/
lib/VMCore/BasicBlock.cpp
@@
-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;