[Lldb-commits] [PATCH] D63322: DWARF: Avoid storing DIERefs in long-lived containers

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 14 01:11:05 PDT 2019


labath created this revision.
labath added reviewers: clayborg, JDevlieghere.
Herald added a subscriber: aprantl.

A user_id_t carries the same information as a DIERef, but it takes up
less space.

Furthermore, DIERef::operator<'s implementation is very
questionable, as it does not take the cu_offset and section fields into
account. Using just the die offset was correct it the days when all
debug info lived in a single section, but since we started supporting
DWO debug info, this was no longer true. The comparison operator could
be fixed, but it seems like using the user_id_t for these purposes is a
better idea overall.

I think this did not cause any bugs, because the only place the
comparison operator was used is in m_function_scope_qualified_name_map,
and this one is local to a dwo file, but I am not 100% sure of that.


https://reviews.llvm.org/D63322

Files:
  source/Plugins/SymbolFile/DWARF/DIERef.h
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63322.204717.patch
Type: text/x-patch
Size: 4317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190614/92f3348c/attachment-0001.bin>


More information about the lldb-commits mailing list