diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-17 21:35:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-17 21:35:08 +0000 |
commit | 6b560918426182d2b46b899d609911d49f6739f7 (patch) | |
tree | 652ea51d8356aeba3e22248484e157b86855f5e2 /include/llvm/CodeGen/MachineInstr.h | |
parent | 23b72005fa7b81eceb0671d070233b56909d1f15 (diff) |
Add some convenience methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index b84388597a..05facbe5e0 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -499,6 +499,16 @@ public: /// 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 |