And here are the patches.... oops.<br><br><div class="gmail_quote">On Fri, Jun 8, 2012 at 10:33 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, these patches address all of your points.<div><br></div><div>1-llvm.patch is the initial changes to the llvm tree. It changes the backend api for llvm/utils/TableGen/* and it makes some very minor non-breaking changes to include/llvm/TableGen/TableGenBackend.h and lib/TableGen/TableGenBackend.h be make emitSourceFileHeader available as a free function (the member function still exists to not break Clang's TableGen)</div>

<div>2-clang.patch changes Clang's TableGen to the new API</div><div>3-llvm.patch removes struct TableGenBackend and all remnants of the old API.</div><div><br></div><div>I built `check` and `clang-test` after applying each one against ToT of the respective repos; all green.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">--Sean Silva</font></span><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Jun 6, 2012 at 1:42 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On Jun 4, 2012, at 11:34 PM, Sean Silva <<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>> wrote:<br>
<br>
> The two attached patches change the TableGen backend API (of LLVM and clang respectively). They are git diff'd against current ToT. They must both be applied "atomically" because the Clang changes depend on LLVM header changes (is there a way to avoid this problem without leaving in the old code in with a "don't touch, will be removed soon" comment?).<br>


<br>
</div>Please try to avoid revlock like that. You can just leave struct TableGenBackend around until it isn't used any longer.<br>
<br>
Also, split the changes to lib/TableGen and include/llvm/TableGen into a third patch.<br>
<br>
> I'm in the air about where to declare the backends namespacewise. In the LLVM TableGen (which I converted first), I decided to put all the backends inside a namespace "tblgen_backends" inside namespace llvm, which turns out to be a pain in the ass.<br>


<br>
There's really no need for that. Backends don't go in libraries. Just stick everything in 'llvm'.<br>
<div><br>
> Another area that I have questions is whether the filenames should be changed, since they are all called FooEmitter.cpp, but sometimes a class FooEmitter doesn't exist anymore. My general feeling is that it doesn't really matter, so best to just leave them. This is easily changed in a future patch if it is deemed desirable.<br>


<br>
</div>Leave them as is.<br>
<span><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br>