[Lldb-commits] [lldb] r119889 - /lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Sean Callanan
scallanan at apple.com
Fri Nov 19 18:19:29 PST 2010
Author: spyffe
Date: Fri Nov 19 20:19:29 2010
New Revision: 119889
URL: http://llvm.org/viewvc/llvm-project?rev=119889&view=rev
Log:
Made GetVariableValue() more robust in the face
of failures in the AST importer. Also ensured
that a variable will not be blindly added if
GetVariableValue() returns an error.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=119889&r1=119888&r2=119889&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Nov 19 20:19:29 2010
@@ -1220,6 +1220,14 @@
{
type_to_use = GuardedCopyType(parser_ast_context, var_ast_context, var_opaque_type);
+ if (!type_to_use)
+ {
+ if (log)
+ log->Printf("Couldn't copy a variable's type into the parser's AST context");
+
+ return NULL;
+ }
+
if (parser_type)
*parser_type = TypeFromParser(type_to_use, parser_ast_context);
}
@@ -1271,6 +1279,9 @@
&ut,
&pt);
+ if (!var_location)
+ return;
+
NamedDecl *var_decl = context.AddVarDecl(pt.GetOpaqueQualType());
ClangExpressionVariable &entity(m_found_entities.VariableAtIndex(m_found_entities.CreateVariable()));
More information about the lldb-commits
mailing list