[PATCH] Move DebugInfo to DebugInfo/DWARF

Chandler Carruth chandlerc at google.com
Thu Jan 29 19:47:36 PST 2015

On Thu, Jan 29, 2015 at 7:36 PM, Zachary Turner <zturner at google.com> wrote:

> > Files:
>> >  include/llvm/DebugInfo/DIContext.h
>> >  include/llvm/DebugInfo/DWARF/DIContext.h
>> >  include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h
>> I don’t know what LLVM’s policy is with respect to include hierarchy and
>> libraries. The name of the files here already nicely create a namespace. If
>> there’s no policy requiring the separate directory, I think I’d slightly
>> prefer to leave all the includes in include/llvm/DebugInfo/ and add the PDB
>> ones in the same place with a PDB prefix. It would also make the patch much
>> smaller.
> Agree it would make the patch smaller, But it seems wrong from a
> modularity standpoint.  I think all include files that are #include'able
> from the same directory should be part of the same library.  I think that's
> the natural expectation of other people when they look in a directory and
> see a list of files, is that they can include any of them and their program
> will work.

I very strongly want the header directories and the library directories to
have a strong 1:1 correspondence. We have been very lax about this in parts
of LLVM in the past and it has almost always come back to bite us in the

> If anything, I would prefer to remove DWARF from the filenames and wrap
> the code in a dwarf namespace, but then that would make the patch even
> bigger.  :(

There is a good reason to keep a prefix on the filenames in addition to the
directory, as practical matter for developers. Lots of editors / IDEs / etc
will search by filename. Collisions here makes things a bit annoying.

I used to really rage against this repetition, but these days it actually
seems like a fairly nice way to make sure that all of the ways you look at
code are differentiated properly -- filename only or listing directories.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150129/77b704de/attachment.html>

More information about the llvm-commits mailing list