mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
add new helper function
llvm-svn: 22698
This commit is contained in:
parent
cb28e2f105
commit
e698d06904
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user