[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 17 14:35:53 PDT 2006
Changes in directory llvm/lib/CodeGen:
MachineInstr.cpp updated: 1.107 -> 1.108
---
Log message:
Add a MachineInstr::eraseFromParent convenience method.
---
Diffs of the changes: (+9 -0)
MachineInstr.cpp | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.107 llvm/lib/CodeGen/MachineInstr.cpp:1.108
--- llvm/lib/CodeGen/MachineInstr.cpp:1.107 Thu Apr 21 17:33:33 2005
+++ llvm/lib/CodeGen/MachineInstr.cpp Mon Apr 17 16:35:41 2006
@@ -100,6 +100,15 @@
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 {
More information about the llvm-commits
mailing list