[Lldb-commits] [lldb] r155455 - /lldb/trunk/source/Expression/IRForTarget.cpp

Sean Callanan scallanan at apple.com
Tue Apr 24 10:56:42 PDT 2012


Author: spyffe
Date: Tue Apr 24 12:56:40 2012
New Revision: 155455

URL: http://llvm.org/viewvc/llvm-project?rev=155455&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Expression/IRForTarget.cpp

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=155455&r1=155454&r2=155455&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Tue Apr 24 12:56:40 2012
@@ -2676,7 +2676,8 @@
     }
     
     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;
     }
     





More information about the lldb-commits mailing list