]> granicus.if.org Git - clang/commitdiff
Add a comment for r104472.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 23 May 2010 20:57:46 +0000 (20:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 23 May 2010 20:57:46 +0000 (20:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp
test/CodeGenCXX/PR5863-unreachable-block.cpp

index 3e807bdbc76f3c6682444a72008f0788c143ebf1..efde3807111fa2cca7d201f6e30d878c347156ed 100644 (file)
@@ -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();
index 91221c9a7a6d0b8715ac4059a75d561ab05c53bc..77096153992b578030532740f793f68193e510a2 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm-only %s
 
-// PR5836
+// PR5863
 class E { };
 
 void P1() {