diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-24 17:48:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-24 17:48:05 +0000 |
commit | 400fd3d80997c401a1bbe69e5d1e94370fcf80cc (patch) | |
tree | 7035ae0e6c71b53e837f7d1a0cf724c751e42959 /lib/CodeGen/CGTemporaries.cpp | |
parent | 65552c424750aaa58533ca385a90b77c033cc635 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGTemporaries.cpp')
-rw-r--r-- | lib/CodeGen/CGTemporaries.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGTemporaries.cpp b/lib/CodeGen/CGTemporaries.cpp index 8e214b4676..bfce1b0f74 100644 --- a/lib/CodeGen/CGTemporaries.cpp +++ b/lib/CodeGen/CGTemporaries.cpp @@ -17,6 +17,9 @@ using namespace CodeGen; void CodeGenFunction::PushCXXTemporary(const CXXTemporary *Temporary, 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::Value *CondPtr = 0; |