Implement remove/eraseFromParent methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16922 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index f54acf5..4ea5775 100644
--- a/lib/VMCore/Instruction.cpp
+++ b/lib/VMCore/Instruction.cpp
@@ -72,6 +72,13 @@
   if (PP && hasName()) PP->getSymbolTable().insert(this);
 }
 
+void Instruction::removeFromParent() {
+  getParent()->getInstList().remove(this);
+}
+
+void Instruction::eraseFromParent() {
+  getParent()->getInstList().erase(this);
+}
 
 const char *Instruction::getOpcodeName(unsigned OpCode) {
   switch (OpCode) {