summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRForTarget.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-04-24 17:56:40 +0000
committerSean Callanan <scallanan@apple.com>2012-04-24 17:56:40 +0000
commit4538aa25bd38a1804e62968e840916ba73491805 (patch)
treef6bd0a65e216a1f1fbd5916b1afdf31a877a875e /lldb/source/Expression/IRForTarget.cpp
parent3cd53a1a52812f4ad0c998b8b8380030b57045f4 (diff)
downloadbcm5719-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.cpp3
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;
}
OpenPOWER on IntegriCloud