Make DwarfAccelTable customizable. NFC.
I sent a couple of patches out a couple of month ago to basically achieve
the same thing in a more convoluted way (by having one class trying to
handle all possible cases).
Instead of making the API of the class fully generic (which makes the
code a mess), allow customization of the accelerator table by:
- basing its behavior on a virtual class defining the type of the ATOMs it stores (the HashDataContents class).
- Making it a base class that needs to be derived to provide the right factory functions for the content.
This NFC patch only provide on derived type DIEDwarfAccelTable with 2
variants (one describing types that dumps the additinal field).
llvm-dsymutil can use this to create tables that contain raw DIE offsets
instead of DIE pointers, and Adrian has a use where he store strings
instead of DIEs.
The HashDataContents gains a virtual pointer, but stays the same size
as I dropped an unused field. We can move the virtual inheritance to
the DwarfAccelTable itself in a followup, but this would be more code
(and thus harder to review) as it requires that the generic code iterates
over a vector of opaque data rather than the handy HashDataContents *.