Skip to content
Snippets Groups Projects
Commit 4cd5d53e authored by Douglas Gregor's avatar Douglas Gregor
Browse files

Assert that we aren't trying to push the same C++ temporary onto the live...

Assert that we aren't trying to push the same C++ temporary onto the live temporary stack twice. A little insurance against PR5867 surprising us again

llvm-svn: 92132
parent f82bead3
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,9 @@ using namespace CodeGen; ...@@ -17,6 +17,9 @@ using namespace CodeGen;
void CodeGenFunction::PushCXXTemporary(const CXXTemporary *Temporary, void CodeGenFunction::PushCXXTemporary(const CXXTemporary *Temporary,
llvm::Value *Ptr) { llvm::Value *Ptr) {
assert((LiveTemporaries.empty() ||
LiveTemporaries.back().ThisPtr != Ptr) &&
"Pushed the same temporary twice; AST is likely wrong");
llvm::BasicBlock *DtorBlock = createBasicBlock("temp.dtor"); llvm::BasicBlock *DtorBlock = createBasicBlock("temp.dtor");
llvm::Value *CondPtr = 0; llvm::Value *CondPtr = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment