projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b56091
)
Add a MachineInstr::eraseFromParent convenience method.
author
Chris Lattner
<sabre@nondot.org>
Mon, 17 Apr 2006 21:35:41 +0000
(21:35 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 17 Apr 2006 21:35:41 +0000
(21:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27775
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineInstr.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineInstr.cpp
b/lib/CodeGen/MachineInstr.cpp
index 0351cc2783e2286fef7c148d7b46ef414fd1f9bc..34a2a7d62842aafb2aa7d18b7755b957fe2fa276 100644
(file)
--- a/
lib/CodeGen/MachineInstr.cpp
+++ b/
lib/CodeGen/MachineInstr.cpp
@@
-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 {