Use Instruction::eraseFromParent().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52606 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index 58fd682..daf8ef0 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -177,7 +177,7 @@
             BranchInst::Create(II->getNormalDest(), I);
 
           // Delete the old call site
-          MI->getParent()->getInstList().erase(I);
+          I->eraseFromParent();
           Changed = true;
           ++NumRaised;
         }