I think I found it. Under "ModuleBuilder.h" in the codegen section there is the 'class CodeGenerator' which inherits from ASTConsumer. Since, I do not want to interface with 'CreateLLVMCodeGen' I do not want to use the 'CodeGenerator' class. However, I should be able to generate off of the 'ASTConsumer.' <div>
<br></div><div>Thanks,</div><div>Jeff Kunkel</div><div><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 7:38 PM, Jeff Kunkel <span dir="ltr"><<a href="mailto:jdkunk3@gmail.com">jdkunk3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Aye, you said it stops before CodeGen. I was going to replace the llvm code gen to an output a near source translation with boost::python components being added in as needed. I am just having a hard time figuring where to hook into the code. <div>
<br></div><div>Basically Clang completes the AST. Then Clang informs Clang-CodeGen that it is complete and it may generate code for this module. I would like to hook into this code gen step and replace it. Unfortunately, I cannot see how it is hooked in. I cannot see the joint which connect CodeGen and the AST generation.</div>
<div><br></div><div>Second, from the comments so far, I think this is a worthy project. Unfortunately, the time it would take to reinvent what boost::python does with CPython might be a bear in its own right. However, the library will be made with the hope that the boost::python calls may be replaced with strait CPython.</div>
<div><br></div><div>- Thanks</div><div>Jeff Kunkel<div><div></div><div class="h5"><br><div><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 7:07 PM, Cédric Venet <span dir="ltr"><<a href="mailto:cedric.venet@laposte.net" target="_blank">cedric.venet@laposte.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 05/11/2010 22:38, Jeff Kunkel a écrit :<br>
<div>> Stefan,<br>
><br>
> Aye, I agree. But, until that environment exists, I cannot use it.<br>
><br>
> Oh, any advice on a starting point? I am floundering about the<br>
> clangCodeGen library, but I am not sure this is the correct place to<br>
> insert my translation.<br>
><br>
<br>
</div>I am no expert but I do not think its the good place. The simplest<br>
things would probably be to build the ast (ie a standard compilation<br>
which stop before codegen) and then walk the list of<br>
definition/declaration and emit your binding for each. you may want to<br>
look at various ast consumers as examples (don't know if it is better to<br>
do as ast consumer or to walk the ast yourself.)<br>
No a lot of information here, but it may answer your initial question<br>
better than the other (interesting) discutions.<br>
<br>
regards,<br>
<font color="#888888">Cédric<br>
</font><div><div></div><div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>