<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Jan 2, 2009, at 12:21 PM, Misha Brukman wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<br><br>Reading this doc: <a href="http://llvm.org/docs/CodingStandards.html#hl_privateheaders">http://llvm.org/docs/CodingStandards.html#hl_privateheaders</a>, it suggests putting private implementation details outside of llvm/include/* to avoid polluting the public header space. This makes sense, and it works fine, because make enters every directory and hence doesn't need a -I path to include them.</blockquote><div><br></div><div>Conceptually, this kind of test should have the same include path view</div><div>of the source tree as the source it's testing. Would it be possible to create</div><div>a parallel directory structure under the unittests directory? That way, a test</div><div>in unittests/lib/Transform/... could</div><div>be given -I$(LLVM_SRC_ROOT)/lib/Transform/... .</div><div><br></div><blockquote type="cite"><br> <br>However, unittests need to also #include these headers to be able to test the internal implementations, so here are potential ways to do this:<br>1) Leave headers where they are now; pass in -I$(LLVM_SRC_ROOT) and #include "lib/Transform/..." for the unittests<br> 2) Same as above, except with -I$(LLVM_SRC_ROOT)/lib and #include "Transform/..."<br>3) Create a new header directory for internal headers, e.g. llvm/include/llvm/internal/ and put private headers there; no one needs any new -I switches, implementation libraries and unittests all say #include "llvm/internal/*" and all is well. If there's a concern that we are distributing/installing private headers, we can amend the install script to "rm -rf llvm/include/internal" to avoid the issue.</blockquote><div><br></div><div>Otherwise, if we're voting, I vote for #2, because it keeps the tree a little</div><div>tidier. Also, LLVM is used in diverse settings with a variety of install scripts,</div><div>so it's preferable to keep things simple. </div><div><br></div><div>Dan</div><div><br></div></div></body></html>