[all-commits] [llvm/llvm-project] 15a1f7: [AppleTables] Implement iterator over all entries ...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Wed Jun 21 03:45:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15a1f7f6f7be103820b6a0c4caea1ec58c01d906
      https://github.com/llvm/llvm-project/commit/15a1f7f6f7be103820b6a0c4caea1ec58c01d906
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2023-06-21 (Wed, 21 Jun 2023)

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

  Log Message:
  -----------
  [AppleTables] Implement iterator over all entries in table

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.

Depends on D153066

Differential Revision: https://reviews.llvm.org/D153066




More information about the All-commits mailing list