<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 29, 2015 at 7:36 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Files:<br>
>  include/llvm/DebugInfo/<u></u>DIContext.h<br>
>  include/llvm/DebugInfo/DWARF/<u></u>DIContext.h<br>
>  include/llvm/DebugInfo/DWARF/<u></u>DWARFAbbreviationDeclaration.h<br>
<br>
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.<br></blockquote></span>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.</blockquote><div><br></div><div>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 end.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  <br><div><br></div><div>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.  :(</div></blockquote><div><br></div><div>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.</div><div><br></div><div>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. </div></div><br><br></div></div>