aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r--CodeGen/CodeGenFunction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp
index 190da77b2b..aa9d2c6054 100644
--- a/CodeGen/CodeGenFunction.cpp
+++ b/CodeGen/CodeGenFunction.cpp
@@ -145,6 +145,10 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD) {
assert(BreakContinueStack.empty() &&
"mismatched push/pop in break/continue stack!");
+ // Remove the AllocaInsertPt instruction, which is just a convenience for us.
+ AllocaInsertPt->eraseFromParent();
+ AllocaInsertPt = 0;
+
// Verify that the function is well formed.
assert(!verifyFunction(*CurFn));
}