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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 9262f0b..80b6b06 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -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))
                     {
-                        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;
                         }
                     }