summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-08-17 20:31:46 +0000
committerGreg Clayton <gclayton@apple.com>2015-08-17 20:31:46 +0000
commit196e8cd792dba6c01ba69030122b4e8fc47aab8b (patch)
tree6ccdfaedca0093f8c7c5ffaefec4958cab8c3bfb /lldb/source/Plugins
parent6dc8ae10aa47c59f44339f1e024ee640c72092a8 (diff)
downloadbcm5719-llvm-196e8cd792dba6c01ba69030122b4e8fc47aab8b.tar.gz
bcm5719-llvm-196e8cd792dba6c01ba69030122b4e8fc47aab8b.zip
Make sure to save the types we parse in our SymbolFile's type list so they don't get deleted.
llvm-svn: 245237
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 1f4a6426f99..1404e329f5c 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3789,15 +3789,23 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &
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
OpenPOWER on IntegriCloud