[Lldb-commits] [lldb] r150004 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Sean Callanan scallanan at apple.com
Tue Feb 7 13:13:38 PST 2012


Author: spyffe
Date: Tue Feb  7 15:13:38 2012
New Revision: 150004

URL: http://llvm.org/viewvc/llvm-project?rev=150004&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=150004&r1=150003&r2=150004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Feb  7 15:13:38 2012
@@ -4660,27 +4660,25 @@
                     }
 
                     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))
-                        {
-                            // 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;
-                            }
+
+                    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)
+                        {
+                            m_die_to_type[die] = type_sp.get();
+                            return type_sp;
                         }
                     }
                     





More information about the lldb-commits mailing list