summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-02-07 21:13:38 +0000
committerSean Callanan <scallanan@apple.com>2012-02-07 21:13:38 +0000
commit8e8072d1953995e2469c487a3ded267fe94e4f7a (patch)
tree534876ec82972a75974c1030303f62be12a86d58
parent61f210b5c0736d773e82efa7372cfbd3d13a04be (diff)
downloadbcm5719-llvm-8e8072d1953995e2469c487a3ded267fe94e4f7a.tar.gz
bcm5719-llvm-8e8072d1953995e2469c487a3ded267fe94e4f7a.zip
Made SymbolFileDWARF be less strict when looking
for types that can be uniqued to the given type. This is especially helpful when types are missing file and line information. llvm-svn: 150004
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 9262f0b6d0d..80b6b06dcd8 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -4660,27 +4660,25 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
UniqueDWARFASTType unique_ast_entry;
- if (decl.IsValid())
+
+ if (GetUniqueDWARFASTTypeMap().Find (type_name_const_str,
+ this,
+ dwarf_cu,
+ die,
+ decl,
+ byte_size_valid ? byte_size : -1,
+ unique_ast_entry))
{
- if (GetUniqueDWARFASTTypeMap().Find (type_name_const_str,
- this,
- dwarf_cu,
- die,
- decl,
- byte_size_valid ? byte_size : -1,
- unique_ast_entry))
+ // We have already parsed this type or from another
+ // compile unit. GCC loves to use the "one definition
+ // rule" which can result in multiple definitions
+ // of the same class over and over in each compile
+ // unit.
+ type_sp = unique_ast_entry.m_type_sp;
+ if (type_sp)
{
- // We have already parsed this type or from another
- // compile unit. GCC loves to use the "one definition
- // rule" which can result in multiple definitions
- // of the same class over and over in each compile
- // unit.
- type_sp = unique_ast_entry.m_type_sp;
- if (type_sp)
- {
- m_die_to_type[die] = type_sp.get();
- return type_sp;
- }
+ m_die_to_type[die] = type_sp.get();
+ return type_sp;
}
}
OpenPOWER on IntegriCloud