Fixed a problem where the dynamic checkers (i.e.,
the Objective-C object checker and the pointer
checker) were not always installed into expressions.
<rdar://problem/13882566>
llvm-svn: 182183
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 765350c..6b3df9a 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -550,27 +550,30 @@
if (execution_policy == eExecutionPolicyAlways || !can_interpret)
{
- if (m_expr.NeedsValidation() && (process && (!process->GetDynamicCheckers())))
- {
- DynamicCheckerFunctions *dynamic_checkers = new DynamicCheckerFunctions();
-
- StreamString install_errors;
-
- if (!dynamic_checkers->Install(install_errors, exe_ctx))
+ if (m_expr.NeedsValidation() && process)
+ {
+ if (!process->GetDynamicCheckers())
{
- if (install_errors.GetString().empty())
- err.SetErrorString ("couldn't install checkers, unknown error");
- else
- err.SetErrorString (install_errors.GetString().c_str());
+ DynamicCheckerFunctions *dynamic_checkers = new DynamicCheckerFunctions();
- return err;
+ StreamString install_errors;
+
+ if (!dynamic_checkers->Install(install_errors, exe_ctx))
+ {
+ if (install_errors.GetString().empty())
+ err.SetErrorString ("couldn't install checkers, unknown error");
+ else
+ err.SetErrorString (install_errors.GetString().c_str());
+
+ return err;
+ }
+
+ process->SetDynamicCheckers(dynamic_checkers);
+
+ if (log)
+ log->Printf("== [ClangUserExpression::Evaluate] Finished installing dynamic checkers ==");
}
- process->SetDynamicCheckers(dynamic_checkers);
-
- if (log)
- log->Printf("== [ClangUserExpression::Evaluate] Finished installing dynamic checkers ==");
-
IRDynamicChecks ir_dynamic_checks(*process->GetDynamicCheckers(), function_name.AsCString());
if (!ir_dynamic_checks.runOnModule(*m_execution_unit->GetModule()))