diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-08-10 00:09:35 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-08-10 00:09:35 +0000 |
| commit | 0ec71a0c01a85b7718aca0517ef0d985001fdde8 (patch) | |
| tree | 2e062592c0297b4e606df76afd31bf5cc43b12d9 | |
| parent | 8564139c0ec56fe8f9e692294f7ae103b609dbcb (diff) | |
| download | bcm5719-llvm-0ec71a0c01a85b7718aca0517ef0d985001fdde8.tar.gz bcm5719-llvm-0ec71a0c01a85b7718aca0517ef0d985001fdde8.zip | |
Fixed a case where GCC was emitting a DW_TAG_class_type that has a DW_AT_declaration set to true, yet the class actually contains a definition for the class in that DIE.
llvm-svn: 188124
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index aa79d291ab8..f265af837ee 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -6193,6 +6193,30 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, GetUniqueDWARFASTTypeMap().Insert (type_name_const_str, unique_ast_entry); + if (is_forward_declaration && die->HasChildren()) + { + // Check to see if the DIE actually has a definition, some version of GCC will + // emit DIEs with DW_AT_declaration set to true, but yet still have subprogram, + // members, or inheritance, so we can't trust it + const DWARFDebugInfoEntry *child_die = die->GetFirstChild(); + while (child_die) + { + switch (child_die->Tag()) + { + case DW_TAG_inheritance: + case DW_TAG_subprogram: + case DW_TAG_member: + case DW_TAG_APPLE_property: + child_die = NULL; + is_forward_declaration = false; + break; + default: + child_die = child_die->GetSibling(); + break; + } + } + } + if (!is_forward_declaration) { // Always start the definition for a class type so that |

