[cfe-dev] Inserting a high level transformation pass that uses TreeTransform

JohnH jan.hoogerbrugge at gmail.com
Mon Mar 4 12:48:04 PST 2013


Hi,

I should have told that I want to do a bit more than inserting calls. I also
want to duplicate some pieces of code like:

  for(...)
    S;

to:

  if(...)
  {
    for(...)
      S;
  }
  else
  {
    for(...)
      S;
  }

So I hope that I can duplicate code in a TreeTransform, for example, when I
encounter the for loop in the
example above.

I still have not found a place to insert my transformation. Can anybody
point me to a suitable place in the
code? Moreover, how should I use TreeTransform? I construct it with a Sema,
but how do I start it? With
the root AST of a translation unit or a function?

Is there documentation available that could help me?

Regards,
John.
  



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Inserting-a-high-level-transformation-pass-that-uses-TreeTransform-tp4030773p4030809.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list