diff options
author | Greg Clayton <gclayton@apple.com> | 2010-11-09 04:42:43 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-11-09 04:42:43 +0000 |
commit | c615ce49649c6dc9ed4b5b8e74b808c7bca64081 (patch) | |
tree | f6c58a4f5575e103be55ed8689fbae8df52a1929 /lldb/source/Expression/ClangExpressionDeclMap.cpp | |
parent | 416463f7f3f97ffd9994cea0387f2dddd101156e (diff) | |
download | bcm5719-llvm-c615ce49649c6dc9ed4b5b8e74b808c7bca64081.tar.gz bcm5719-llvm-c615ce49649c6dc9ed4b5b8e74b808c7bca64081.zip |
Fixed an issue in the DWARF parser that was causing forward declarations
to not get resolved.
Fixed the "void **isa_ptr" variable inside the objective C verifier to start
with a '$' character so we don't go looking for it in our program.
Moved the lookup for "$__lldb_class" into the part that knows we are looking
for internal types that start with a '$'.
llvm-svn: 118488
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 9dd2ea292c2..224fbacb415 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -970,45 +970,6 @@ ClangExpressionDeclMap::GetDecls if (m_exe_ctx.frame == NULL) return; - static ConstString g_lldb_class_name ("$__lldb_class"); - if (name == g_lldb_class_name) - { - // Clang is looking for the type of "this" - - VariableList *vars = m_exe_ctx.frame->GetVariableList(false); - - if (!vars) - return; - - lldb::VariableSP this_var = vars->FindVariable(ConstString("this")); - - if (!this_var) - return; - - Type *this_type = this_var->GetType(); - - if (!this_type) - return; - - TypeFromUser this_user_type(this_type->GetClangType(), - this_type->GetClangAST()); - - m_object_pointer_type = this_user_type; - - void *pointer_target_type; - - if (!ClangASTContext::IsPointerType(this_user_type.GetOpaqueQualType(), - &pointer_target_type)) - return; - - TypeFromUser class_user_type(pointer_target_type, - this_type->GetClangAST()); - - AddOneType(context, class_user_type, true); - - return; - } - SymbolContextList sym_ctxs; // Only look for functions by name out in our symbols if the function @@ -1066,6 +1027,45 @@ ClangExpressionDeclMap::GetDecls } else { + static ConstString g_lldb_class_name ("$__lldb_class"); + if (name == g_lldb_class_name) + { + // Clang is looking for the type of "this" + + VariableList *vars = m_exe_ctx.frame->GetVariableList(false); + + if (!vars) + return; + + lldb::VariableSP this_var = vars->FindVariable(ConstString("this")); + + if (!this_var) + return; + + Type *this_type = this_var->GetType(); + + if (!this_type) + return; + + TypeFromUser this_user_type(this_type->GetClangType(), + this_type->GetClangAST()); + + m_object_pointer_type = this_user_type; + + void *pointer_target_type; + + if (!ClangASTContext::IsPointerType(this_user_type.GetOpaqueQualType(), + &pointer_target_type)) + return; + + TypeFromUser class_user_type(pointer_target_type, + this_type->GetClangAST()); + + AddOneType(context, class_user_type, true); + + return; + } + ClangExpressionVariable *pvar(m_persistent_vars->GetVariable(name)); if (pvar) |