Author: gclayton Date: Mon Aug 17 15:31:46 2015 New Revision: 245237 URL: http://llvm.org/viewvc/llvm-project?rev=245237&view=rev Log: Make sure to save the types we parse in our SymbolFile's type list so they don't get deleted.
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=245237&r1=245236&r2=245237&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Aug 17 15:31:46 2015 @@ -3789,15 +3789,23 @@ SymbolFileDWARF::FindDefinitionTypeForDW TypeSP SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry *die, bool *type_is_new_ptr) { + TypeSP type_sp; + TypeSystem *type_system = GetTypeSystemForLanguage(dwarf_cu->GetLanguageType()); if (type_system) { Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO); - return type_system->ParseTypeFromDWARF (sc, this, dwarf_cu, die, log, type_is_new_ptr); + type_sp = type_system->ParseTypeFromDWARF (sc, this, dwarf_cu, die, log, type_is_new_ptr); + if (type_sp) + { + TypeList* type_list = GetTypeList(); + if (type_list) + type_list->Insert(type_sp); + } } - else - return TypeSP(); + + return type_sp; } size_t _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits