summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-05-23 20:57:46 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-05-23 20:57:46 +0000
commitdc999653431c905c49e1c96d723ccfa02d85a14d (patch)
tree355006ec06f3dcbee280d67c0210fbc4f53d2b48 /clang/lib/CodeGen/CGStmt.cpp
parent11d4d9ec4e5567a6808e46ae87cb80e6250967ff (diff)
downloadbcm5719-llvm-dc999653431c905c49e1c96d723ccfa02d85a14d.tar.gz
bcm5719-llvm-dc999653431c905c49e1c96d723ccfa02d85a14d.zip
Add a comment for r104472.
llvm-svn: 104473
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 3e807bdbc76..efde3807111 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -79,6 +79,9 @@ void CodeGenFunction::EmitStmt(const Stmt *S) {
// Expression emitters don't handle unreachable blocks yet, so look for one
// explicitly here. This handles the common case of a call to a noreturn
// function.
+ // We can't erase blocks with an associated cleanup size here since the
+ // memory might be reused, leaving the old cleanup info pointing at a new
+ // block.
if (llvm::BasicBlock *CurBB = Builder.GetInsertBlock()) {
if (CurBB->empty() && CurBB->use_empty() && !BlockScopes.count(CurBB)) {
CurBB->eraseFromParent();
OpenPOWER on IntegriCloud