diff options
| author | Sean Callanan <scallanan@apple.com> | 2011-12-08 23:45:45 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2011-12-08 23:45:45 +0000 |
| commit | 12014a04711a9c3efa5aed1c80b9c4288ab209eb (patch) | |
| tree | 6367e6c054d46d1dd42ad16a693065fe2b402a65 /lldb/source/Plugins/SymbolFile/DWARF | |
| parent | 7c01c1af1978527fdab4d5542d60aeff85cb4221 (diff) | |
| download | bcm5719-llvm-12014a04711a9c3efa5aed1c80b9c4288ab209eb.tar.gz bcm5719-llvm-12014a04711a9c3efa5aed1c80b9c4288ab209eb.zip | |
If the expression parser is unable to complete a TagDecl
in the context in which it was originally found, the
expression parser now goes hunting for it in all modules
(in the appropriate namespace, if applicable). This means
that forward-declared types that exist in another shared
library will now be resolved correctly.
Added a test case to cover this. The test case also tests
"frame variable," which does not have this functionality
yet.
llvm-svn: 146204
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 196bec836aa..e0abf9a0f44 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -4548,22 +4548,25 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, GetUniqueDWARFASTTypeMap().Insert (type_name_const_str, unique_ast_entry); - if (die->HasChildren() == false && is_forward_declaration == false) - { - // No children for this struct/union/class, lets finish it - ast.StartTagDeclarationDefinition (clang_type); - ast.CompleteTagDeclarationDefinition (clang_type); - } - else if (clang_type_was_created) - { - // Leave this as a forward declaration until we need - // to know the details of the type. lldb_private::Type - // will automatically call the SymbolFile virtual function - // "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition(Type *)" - // When the definition needs to be defined. - m_forward_decl_die_to_clang_type[die] = clang_type; - m_forward_decl_clang_type_to_die[ClangASTType::RemoveFastQualifiers (clang_type)] = die; - ClangASTContext::SetHasExternalStorage (clang_type, true); + if (!is_forward_declaration) + { + if (die->HasChildren() == false) + { + // No children for this struct/union/class, lets finish it + ast.StartTagDeclarationDefinition (clang_type); + ast.CompleteTagDeclarationDefinition (clang_type); + } + else if (clang_type_was_created) + { + // Leave this as a forward declaration until we need + // to know the details of the type. lldb_private::Type + // will automatically call the SymbolFile virtual function + // "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition(Type *)" + // When the definition needs to be defined. + m_forward_decl_die_to_clang_type[die] = clang_type; + m_forward_decl_clang_type_to_die[ClangASTType::RemoveFastQualifiers (clang_type)] = die; + ClangASTContext::SetHasExternalStorage (clang_type, true); + } } } |

