summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-05-18 00:38:20 +0000
committerSean Callanan <scallanan@apple.com>2013-05-18 00:38:20 +0000
commite8cde68a2a24df74c2d3d4b95fbeb107fb45ec14 (patch)
tree7adfb1e90081b391e391d81557ad66b95c22b07d /lldb/source/Expression/ClangExpressionParser.cpp
parentb6ed153155d6fd961b5403a094598f366c581302 (diff)
downloadbcm5719-llvm-e8cde68a2a24df74c2d3d4b95fbeb107fb45ec14.tar.gz
bcm5719-llvm-e8cde68a2a24df74c2d3d4b95fbeb107fb45ec14.zip
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
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp37
1 files changed, 20 insertions, 17 deletions
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()))
OpenPOWER on IntegriCloud