[PATCH] D11805: Thread premissions through sys::fs::create_director{y|ies}

Frederic Riss via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 08:59:42 PDT 2015


friss created this revision.
friss added reviewers: echristo, dblaikie.
friss added a subscriber: llvm-commits.

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 *.

http://reviews.llvm.org/D11805

Files:
  include/llvm/Support/FileSystem.h
  lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
  lib/CodeGen/AsmPrinter/DwarfAccelTable.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/Support/Path.cpp
  lib/Support/Unix/Path.inc
  lib/Support/Windows/Path.inc
  unittests/Support/Path.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11805.31451.patch
Type: text/x-patch
Size: 16595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150806/e8f88a12/attachment.bin>


More information about the llvm-commits mailing list