[Lldb-commits] [PATCH] D74690: Separate DIERef vs. user_id_t: GetForwardDeclClangTypeToDie()
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Feb 16 06:51:50 PST 2020
jankratochvil created this revision.
jankratochvil added reviewers: labath, clayborg.
jankratochvil added a project: LLDB.
Herald added a reviewer: shafik.
Reasons are the same as: D74637 <https://reviews.llvm.org/D74637>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74690
Files:
lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,7 +322,7 @@
typedef llvm::DenseMap<const DWARFDebugInfoEntry *,
lldb::opaque_compiler_type_t>
DIEToClangType;
- typedef llvm::DenseMap<lldb::opaque_compiler_type_t, lldb::user_id_t>
+ typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef>
ClangTypeToDIE;
DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF);
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1723,7 +1723,7 @@
clang_type.GetOpaqueQualType();
dwarf->GetForwardDeclClangTypeToDie()
[ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
- die.GetID();
+ *die.GetDIERef();
m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
}
}
Index: lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
@@ -34,6 +34,8 @@
assert(this->dwo_num() == dwo_num && "Dwo number out of range?");
}
+ DIERef() {}
+
llvm::Optional<uint32_t> dwo_num() const {
if (m_dwo_num_valid)
return m_dwo_num;
@@ -58,7 +60,7 @@
uint32_t m_dwo_num : 30;
uint32_t m_dwo_num_valid : 1;
uint32_t m_section : 1;
- dw_offset_t m_die_offset;
+ dw_offset_t m_die_offset = DW_INVALID_OFFSET;
};
static_assert(sizeof(DIERef) == 8, "");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74690.244873.patch
Type: text/x-patch
Size: 1866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200216/630400d7/attachment.bin>
More information about the lldb-commits
mailing list