Changes in directory llvm/lib/VMCore:

BasicBlock.cpp updated: 1.73 -> 1.74
---
Log message:

add method, correct comment


---
Diffs of the changes:  (+10 -3)

 BasicBlock.cpp |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)


Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.73 llvm/lib/VMCore/BasicBlock.cpp:1.74
--- llvm/lib/VMCore/BasicBlock.cpp:1.73 Sun Aug 27 07:54:02 2006
+++ llvm/lib/VMCore/BasicBlock.cpp      Fri Sep 22 23:03:45 2006
@@ -103,14 +103,21 @@
   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.
+/// moveBefore - Unlink this basic block 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);
 }
 
+/// 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() {
   if (InstList.empty()) return 0;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to