[PATCH] D153066: [AppleTables] Implement iterator over all entries in table

Felipe de Azevedo Piovezan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 12:15:11 PDT 2023


fdeazeve created this revision.
Herald added a reviewer: jhenderson.
Herald added a subscriber: cmtice.
Herald added a project: All.
fdeazeve requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This commit adds functionality to the Apple Accelerator table allowing iteration
over all elements in the table.

Our iterators look like streaming iterators: when we increment the iterator we
check if there is still enough data in the "stream" (in our case, the blob of
data of the accelerator table) and extract the next entry. If any failures
occur, we immediately set the iterator to be the end iterator.

Since the ultimate user of this functionality is LLDB, there are roughly two
iteration methods we want support: one that also loads the name of each entry,
and one which does not. Loading names is measurably slower (one order the
magnitude) than only loading DIEs, so we used some template metaprograming to
implement both iteration methods.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153066

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
  llvm/test/DebugInfo/Generic/apple-names-hash-collisions.ll
  llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153066.531872.patch
Type: text/x-patch
Size: 10377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/8bd3be94/attachment.bin>


More information about the llvm-commits mailing list