summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2018-04-30 16:04:32 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2018-04-30 16:04:32 +0000
commit55c84b1a4e98a1674cfa4508bd2c42b831f49369 (patch)
treefcb8009dcd09597b6f4eb1dd1c9fb888d1196c56 /lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
parente047d3529baa0920dc55ae278c39e40f03baa2af (diff)
downloadbcm5719-llvm-55c84b1a4e98a1674cfa4508bd2c42b831f49369.tar.gz
bcm5719-llvm-55c84b1a4e98a1674cfa4508bd2c42b831f49369.zip
Match also DW_TAG_partial_unit when DW_TAG_compile_unit is matched
Code commonly checks if the parent DIE is DW_TAG_compile_unit. But DW_TAG_partial_unit also acts as DW_TAG_compile_unit for DWZ as DWZ is using DW_TAG_imported_unit only at the top unit level. Differential revision: https://reviews.llvm.org/D40469 llvm-svn: 331194
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
index 6662a4581ec..631e40f4423 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp
@@ -431,7 +431,8 @@ TypeSP DWARFASTParserGo::ParseTypeFromDWARF(
dw_tag_t sc_parent_tag = sc_parent_die.Tag();
SymbolContextScope *symbol_context_scope = NULL;
- if (sc_parent_tag == DW_TAG_compile_unit) {
+ if (sc_parent_tag == DW_TAG_compile_unit ||
+ sc_parent_tag == DW_TAG_partial_unit) {
symbol_context_scope = sc.comp_unit;
} else if (sc.function != NULL && sc_parent_die) {
symbol_context_scope =
OpenPOWER on IntegriCloud