[cfe-commits] r92134 - /cfe/trunk/lib/CodeGen/CGTemporaries.cpp

Douglas Gregor dgregor at apple.com
Thu Dec 24 10:16:21 PST 2009


Author: dgregor
Date: Thu Dec 24 12:16:21 2009
New Revision: 92134

URL: http://llvm.org/viewvc/llvm-project?rev=92134&view=rev
Log:
Fix double-destruction assertion to account for temporaries in conditionals

Modified:
    cfe/trunk/lib/CodeGen/CGTemporaries.cpp

Modified: cfe/trunk/lib/CodeGen/CGTemporaries.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGTemporaries.cpp?rev=92134&r1=92133&r2=92134&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGTemporaries.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGTemporaries.cpp Thu Dec 24 12:16:21 2009
@@ -18,7 +18,8 @@
 void CodeGenFunction::PushCXXTemporary(const CXXTemporary *Temporary,
                                        llvm::Value *Ptr) {
   assert((LiveTemporaries.empty() ||
-          LiveTemporaries.back().ThisPtr != Ptr) &&
+          LiveTemporaries.back().ThisPtr != Ptr ||
+          ConditionalBranchLevel) &&
          "Pushed the same temporary twice; AST is likely wrong");
   llvm::BasicBlock *DtorBlock = createBasicBlock("temp.dtor");
 





More information about the cfe-commits mailing list