[PATCH] DwarfAccelTable: Enable use of static offsets instead of DIEs and string symbols.

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


Hi dblaikie, echristo, aprantl,

llvm-dsymutil doesn't keep DIE objects once it has handled an object,
but the accelerator tables are global and thus are emitted at the end
of the link. The current scheme of using pointers to DIEs can't work
for llvm-dsymutil. llvm-dsymutil however knows the offset a DIE will
be placed at right upon creation though.

Similarly for the string table, llvm-dsymutil doesn't generate MCSymbols
for it, becasue it doesn't need any relocation.

This patch adds 2 knobs to the DwarfAccelTable to be able to use raw
offsets for DIEs and strings, so that it can be used by producers
like llvm-dsymutil.

I separated the knobs for strings and DIEs, as I have another patch
in my backlog that would prevent the creation of MCSymbols for strings
in MachO files (the linker doesn't care about relocations in debug info,
thus there is no point in using a lot of memeory to generate those).
When/If this patch gets applied, it will use a mix of string offset
and DIE objects.

http://reviews.llvm.org/D8216

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

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


More information about the llvm-commits mailing list