mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
Fixed a bug where persistent variables did not
live as long as they needed to. This led to equality tests involving persistent variables often failing or succeeding when they had no business doing so. To do this, I introduced the ability for a memory allocation to "leak" - that is, to persist in the process beyond the lifetime of the expression. Hand-declared persistent variables do this now. <rdar://problem/13956311> llvm-svn: 182528
This commit is contained in:
@@ -109,7 +109,11 @@ public:
|
||||
// Clear the flag if the variable will never be deallocated.
|
||||
|
||||
if (m_persistent_variable_sp->m_flags & ClangExpressionVariable::EVKeepInTarget)
|
||||
{
|
||||
Error leak_error;
|
||||
map.Leak(mem, leak_error);
|
||||
m_persistent_variable_sp->m_flags &= ~ClangExpressionVariable::EVNeedsAllocation;
|
||||
}
|
||||
|
||||
// Write the contents of the variable to the area.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user