[cfe-dev] Invoking compilation after plugin execution

Dimitrij Kotrev dimitrij.kotrev at googlemail.com
Fri Feb 18 08:36:28 PST 2011

my plugin performs some transformations on the AST. I want that the
code is generated after i performed this transformations.


2011/2/18 Nico Weber <thakis at google.com>:
> Hi,
> -plugin replaces the codegen phase. You could use -add-plugin, which runs
> the plugin in addition to codegen—but after codegen (because the ast is
> supposed to be immutable once constructed).
> What are you trying to do?
> Nico
> On Feb 18, 2011 3:56 PM, "Dimitrij Kotrev" <dimitrij.kotrev at googlemail.com>
> wrote:
>> Hello,
>> i've written a plugin for clang, which i want to use in my compilation
>> process. What
>> i want to achieve is that my plugin executed first and then the
>> default compilation
>> starts. So far i've done the following:
>> 1. I dumped the arguments for the default compilation with the '-###'
>> argument.
>> 2. Added my plugin invocation argument to these arguments. (-load
>> libpl.so -plugin pl)
>> After executing clang with the new argument string, i can see that
>> only my plugin is
>> executed and nothing else. So how do i achieve my goal?
>> Thanks,
>> Dimi
>> _______________________________________________
>> 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