Use Instruction::eraseFromParent().

llvm-svn: 52606
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
index 58fd682..daf8ef0 100644
--- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/llvm/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;
         }