[Lldb-commits] [lldb] r265494 - Don't write "using $_lldb_local_vars" statements for variables with

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 5 17:24:19 PDT 2016


Author: jingham
Date: Tue Apr  5 19:24:17 2016
New Revision: 265494

URL: http://llvm.org/viewvc/llvm-project?rev=265494&view=rev
Log:
Don't write "using $_lldb_local_vars" statements for variables with
no name.  These were showing up with a recent clang, I haven't tracked
down why yet, but adding them is clearly wrong. 

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

Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=265494&r1=265493&r2=265494&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Apr  5 19:24:17 2016
@@ -188,7 +188,7 @@ AddLocalVariableDecls(const lldb::Variab
         lldb::VariableSP var_sp = var_list_sp->GetVariableAtIndex(i);
 
         ConstString var_name = var_sp->GetName();
-        if (var_name == ConstString("this") || var_name == ConstString(".block_descriptor"))
+        if (!var_name || var_name == ConstString("this") || var_name == ConstString(".block_descriptor"))
             continue;
 
         stream.Printf("using $__lldb_local_vars::%s;\n", var_name.AsCString());




More information about the lldb-commits mailing list