From e8cde68a2a24df74c2d3d4b95fbeb107fb45ec14 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Sat, 18 May 2013 00:38:20 +0000 Subject: Fixed a problem where the dynamic checkers (i.e., the Objective-C object checker and the pointer checker) were not always installed into expressions. llvm-svn: 182183 --- lldb/source/Expression/ClangExpressionParser.cpp | 37 +++++++++++++----------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'lldb/source/Expression/ClangExpressionParser.cpp') diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 765350ca989..6b3df9a689a 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -550,27 +550,30 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr, 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())) -- cgit v1.2.3