[llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 7 22:22:02 PDT 2005
Changes in directory llvm/lib/VMCore:
Instruction.cpp updated: 1.47 -> 1.48
---
Log message:
add new helper function
---
Diffs of the changes: (+9 -0)
Instruction.cpp | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.47 llvm/lib/VMCore/Instruction.cpp:1.48
--- llvm/lib/VMCore/Instruction.cpp:1.47 Sat Jun 18 13:34:52 2005
+++ llvm/lib/VMCore/Instruction.cpp Mon Aug 8 00:21:50 2005
@@ -65,6 +65,15 @@
getParent()->getInstList().erase(this);
}
+/// moveBefore - Unlink this instruction from its current basic block and
+/// insert it into the basic block that MovePos lives in, right before
+/// MovePos.
+void Instruction::moveBefore(Instruction *MovePos) {
+ MovePos->getParent()->getInstList().splice(MovePos,getParent()->getInstList(),
+ this);
+}
+
+
const char *Instruction::getOpcodeName(unsigned OpCode) {
switch (OpCode) {
// Terminators
More information about the llvm-commits
mailing list