Add a MachineInstr::eraseFromParent convenience method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-04-17 21:35:41 +00:00
parent 6b56091842
commit 48d7c069c7

View File

@ -100,6 +100,15 @@ MachineInstr* MachineInstr::clone() const {
return new MachineInstr(*this);
}
/// removeFromParent - This method unlinks 'this' from the containing basic
/// block, and returns it, but does not delete it.
MachineInstr *MachineInstr::removeFromParent() {
assert(getParent() && "Not embedded in a basic block!");
getParent()->remove(this);
return this;
}
/// OperandComplete - Return true if it's illegal to add a new operand
///
bool MachineInstr::OperandsComplete() const {