[cfe-dev] Invoking compilation after plugin execution
thakis at google.com
Fri Feb 18 09:05:24 PST 2011
On Fri, Feb 18, 2011 at 5:36 PM, Dimitrij Kotrev
<dimitrij.kotrev at googlemail.com> wrote:
> my plugin performs some transformations on the AST. I want that the
> code is generated after i performed this transformations.
As I said, I believe changing the AST after its construction is not
supported. Others might be able to say more (or why :-) ).
> 2011/2/18 Nico Weber <thakis at google.com>:
>> -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?
>> On Feb 18, 2011 3:56 PM, "Dimitrij Kotrev" <dimitrij.kotrev at googlemail.com>
>>> 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 '-###'
>>> 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?
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
More information about the cfe-dev