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:
287921d
)
add new helper function
author
Chris Lattner
<sabre@nondot.org>
Mon, 8 Aug 2005 05:21:50 +0000
(
05:21
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 8 Aug 2005 05:21:50 +0000
(
05:21
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22698
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Instruction.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Instruction.cpp
b/lib/VMCore/Instruction.cpp
index 2bce2dcd22c4781e4db9fa23f95bda46d5344651..342614ef475ef04ad1b3fc5ae69c1fb5649e797d 100644
(file)
--- a/
lib/VMCore/Instruction.cpp
+++ b/
lib/VMCore/Instruction.cpp
@@
-65,6
+65,15
@@
void Instruction::eraseFromParent() {
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