[cfe-dev] Parse AST several times

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jan 2 14:24:37 PST 2013


On Jan 2, 2013, at 12:30 PM, madil90 <madil90 at gmail.com> wrote:

> Hi,
>   I mean once I have overridden the contents or have the new buffer
> containing updated contents, how do i actually compile it? because if i
> leave it at that, the program closes without doing anything. How do i
> actually go forward and generate an executable of those contents.

A somewhat simple way would be to write the buffer to a temporary file and then just invoke the clang executable to do the compiling with the addition of passing "-remap-file" as argument.
See "test/Misc/remap-file.c" for an example of such invocation.

> 
> Regards,
> Adil
> 
> 
> 
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/Parse-AST-several-times-tp4029276p4029317.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list