[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 17 14:35:20 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.165 -> 1.166
---
Log message:
Add some convenience methods.
---
Diffs of the changes: (+10 -0)
MachineInstr.h | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.165 llvm/include/llvm/CodeGen/MachineInstr.h:1.166
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.165 Sat Feb 25 03:52:55 2006
+++ llvm/include/llvm/CodeGen/MachineInstr.h Mon Apr 17 16:35:08 2006
@@ -499,6 +499,16 @@
/// clone - Create a copy of 'this' instruction that is identical in
/// all ways except the the instruction has no parent, prev, or next.
MachineInstr* clone() const;
+
+ /// removeFromParent - This method unlinks 'this' from the containing basic
+ /// block, and returns it, but does not delete it.
+ MachineInstr *removeFromParent();
+
+ /// eraseFromParent - This method unlinks 'this' from the containing basic
+ /// block and deletes it.
+ void eraseFromParent() {
+ delete removeFromParent();
+ }
//
// Debugging support
More information about the llvm-commits
mailing list