remove some obsolete comments, use an AssertingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 68d10ff..dc00a76 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -133,8 +133,9 @@
EmitFunctionEpilog(*CurFnInfo, ReturnValue);
// Remove the AllocaInsertPt instruction, which is just a convenience for us.
- AllocaInsertPt->eraseFromParent();
+ llvm::Instruction *Ptr = AllocaInsertPt;
AllocaInsertPt = 0;
+ Ptr->eraseFromParent();
}
void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy,