[PATCH] DwarfAccelTable: Make Dwarf accelerator table generic.

Frederic Riss friss at apple.com
Tue Mar 10 11:01:09 PDT 2015


Hi dblaikie, echristo, aprantl,

Today, the fields dumped in the accelerator tables are hardcoded to
the 2 variants that LLVM produces. llvm-dsymutil would like to reuse
that code, but needs to ouptut another variant.

This patch makes the DwarfAccelTable generic and the emitted data
is actually derived from the list of atoms passed to its constructor.
In order not to waste memory (this structure can grow very big on
huge programs), it allocates memory for the atom contents right
after the HashDataContents struct and uses memcpy to access them.

The only hardcoded thing is that the first atom must be a DIE offset.
has the table is always used as a map from name to DIEs, this makes
sense.

From the emitted code point of view, the patch is actually NFC, we
rely on the existing tests to prove that the patch doesn' break
anything.

http://reviews.llvm.org/D8215

Files:
  lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
  lib/CodeGen/AsmPrinter/DwarfAccelTable.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8215.21605.patch
Type: text/x-patch
Size: 9450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150310/72600df6/attachment.bin>


More information about the llvm-commits mailing list