[Lldb-commits] [PATCH] D63400: DWARF: Provide accessors to DIERef fields
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 17 02:11:31 PDT 2019
labath created this revision.
labath added reviewers: JDevlieghere, aprantl, clayborg.
Herald added a subscriber: arphaman.
labath added a parent revision: D63399: DWARF: Make DIERefs always valid.
labath added a comment.
(also, cu_offset is renamed to unit_offset, as we now support type units too)
Instead of accessing the fields directly, use accessor functions to
provide access to the DIERef components. This allows us to decouple the
external interface, from the internal representation. The external
interface can use llvm::Optional and similar goodies, while the data can
still be stored internally in a more compact representation.
I also document the purpose of the existing DIERef fields.
The main motivation for this change is a need to introduce an additional
field to the DIERef class, but I believe the change has its own merit.
https://reviews.llvm.org/D63400
Files:
source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/DIERef.cpp
source/Plugins/SymbolFile/DWARF/DIERef.h
source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63400.205004.patch
Type: text/x-patch
Size: 7684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190617/3660c088/attachment.bin>
More information about the lldb-commits
mailing list