diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-05-23 20:57:46 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-05-23 20:57:46 +0000 |
commit | 89cf2e3d9d356a8b960a5ab12ccc677fe2dce7f8 (patch) | |
tree | 7109c79038ed9d57ed9dbfc3442a71fef4d58526 | |
parent | 92b9bd96ce25630f73717965fcaf4b5a761e49e5 (diff) |
Add a comment for r104472.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104473 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 3 | ||||
-rw-r--r-- | test/CodeGenCXX/PR5863-unreachable-block.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 3e807bdbc7..efde380711 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/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(); diff --git a/test/CodeGenCXX/PR5863-unreachable-block.cpp b/test/CodeGenCXX/PR5863-unreachable-block.cpp index 91221c9a7a..7709615399 100644 --- a/test/CodeGenCXX/PR5863-unreachable-block.cpp +++ b/test/CodeGenCXX/PR5863-unreachable-block.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -emit-llvm-only %s -// PR5836 +// PR5863 class E { }; void P1() { |