[cfe-dev] Will Sema break from replacing its CodeGen in the middle of TU ?

Reid Kleckner rnk at google.com
Tue Oct 22 10:41:05 PDT 2013


Hard to say without trying.  I don't think Sema will break.  It simply
calls ASTConsumer methods implemented by CodeGen, which do all the work and
don't return anything back.

However, CodeGen will surely break without some cleverness on your part.
 It will assume that Sema referenced and created GlobalValues for decls
encountered earlier in the TU.


On Mon, Oct 21, 2013 at 11:04 PM, Yaron Keren <yaron.keren at gmail.com> wrote:

> While compiling C++ code, I'm trying to make different function and
> template from the same TU go into different IR modules, in order to support
> sort of lazy compilation with the MCJIT.
>
> I have tried to replace Sema CodeGen in the middle of TU. It sometimes
> worked but mostly crashed while running the code.
>
> It's clear that something is wrong but I am not sure if it's because it
> breaks something in Sema-CodeGen interface assumptions or for other reason,
> possibly related to MCJIT dynamic linker.
>
> Can I use Sema+CodeGen like that?
>
> Yaron
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131022/a54dc3ae/attachment.html>


More information about the cfe-dev mailing list