Add an option to suppress the persistent result variable when running EvaluateExpression

from Python.  If you don't need to refer to the result in another expression, there's no
need to bloat the persistent variable table with them since you already have the result
SBValue to work with.

<rdar://problem/17963645>

llvm-svn: 215244
This commit is contained in:
Jim Ingham 2014-08-08 21:45:36 +00:00
parent 7e774c249f
commit 7ab079b6d0
3 changed files with 28 additions and 0 deletions

View File

@ -98,6 +98,12 @@ public:
void
SetGenerateDebugInfo (bool b = true);
bool
GetSuppressPersistentResult ();
void
SetSuppressPersistentResult (bool b = false);
protected:

View File

@ -102,6 +102,15 @@ public:
%feature("docstring", "Sets whether to generate debug information for the expression and also controls if a SBModule is generated.") SetGenerateDebugInfo;
void
SetGenerateDebugInfo (bool b = true);
bool
GetSuppressPersistentResult ();
%feature("docstring", "Sets whether to produce a persistent result that can be used in future expressions.") SetSuppressPersistentResult;
void
SetSuppressPersistentResult (bool b = false);
protected:

View File

@ -173,6 +173,19 @@ SBExpressionOptions::SetGenerateDebugInfo (bool b)
return m_opaque_ap->SetGenerateDebugInfo(b);
}
bool
SBExpressionOptions::GetSuppressPersistentResult ()
{
return m_opaque_ap->GetResultIsInternal ();
}
void
SBExpressionOptions::SetSuppressPersistentResult (bool b)
{
return m_opaque_ap->SetResultIsInternal (b);
}
EvaluateExpressionOptions *
SBExpressionOptions::get() const
{