diff options
author | Sean Callanan <scallanan@apple.com> | 2012-04-24 17:56:40 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-04-24 17:56:40 +0000 |
commit | 4538aa25bd38a1804e62968e840916ba73491805 (patch) | |
tree | f6bd0a65e216a1f1fbd5916b1afdf31a877a875e /lldb/source/Expression/IRForTarget.cpp | |
parent | 3cd53a1a52812f4ad0c998b8b8380030b57045f4 (diff) | |
download | bcm5719-llvm-4538aa25bd38a1804e62968e840916ba73491805.tar.gz bcm5719-llvm-4538aa25bd38a1804e62968e840916ba73491805.zip |
Fixed a crasher that occurs when an expression
doesn't return a result. If that expression can't
be run in the current context (for example, if it
uses a function and there is no running process)
then we used to try to destroy the nonexistent
result variable. We now only destroy the result
variable if we actually made one.
llvm-svn: 155455
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
-rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 8b2b1192471..fe826cf80ed 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -2676,7 +2676,8 @@ IRForTarget::runOnModule (Module &llvm_module) } if (m_execution_policy == lldb_private::eExecutionPolicyNever) { - m_decl_map->RemoveResultVariable(m_result_name); + if (m_result_name) + m_decl_map->RemoveResultVariable(m_result_name); return false; } |