<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Hi Vassil,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span>Is the patch available for the 3.4.2 version of LLVM or must I migrate to the "current" version ?</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span><br></span></div><div style="color: rgb(0,
 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span>Cheers,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span>Bogdan</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Friday, August 8, 2014 6:16 PM, Vassil Vassilev <vvasilev@cern.ch> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div
 id="yiv6792563898"><div>
    <div class="yiv6792563898moz-cite-prefix">Hi,<br clear="none">
        There is a pending patch on cfe-commits about this "[PATCH]
      clang/Frontend/MultiplexConsumer.h". With it you could reorder the
      ASTConsumers in clang and get yours before codegen.<br clear="none">
      Vassil<br clear="none">
      On 08/08/14 16:48, Bogdan Tabacaru wrote:<br clear="none">
    </div>
    <blockquote type="cite">
      </blockquote></div><div><div class="yiv6792563898yqt9700857600" id="yiv6792563898yqt84664"><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">
        <div class="yiv6792563898" style="">Hi everyone,</div>
        <div class="yiv6792563898" style=""><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;">I want to create a plugin that makes
          some changes on the parsed AST and that directly compiles the
          changes made on the AST. It is important that I do not
          generate a new file with the changes on the AST.</div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;">So, in other words, I want to change
          the AST in place, and then compile it in the same run, using a
          Clang Plugin.</div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;">I am using llvm 3.4.2.</div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="font-size:12pt;">By

            following the RecursiveASTVisitor example, </span>I have
          written a clang plugin which modifies the parsed AST.</div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;">I am using the Rewriter class to
          ReplaceText inside the buffer.</div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;">I am also using the -add-plugin <span class="yiv6792563898" style="font-size:12pt;">command</span><span class="yiv6792563898" style="font-size:12pt;"> </span><span class="yiv6792563898" style="background-color:transparent;">(instead the
            "standard" -plugin command) when calling the plugin.</span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;"><br clear="none" class="yiv6792563898" style="">
          </span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;">The rewriting part works excellently.
            However, when I continue the compilation, clang only
            compiles the original file, instead of the original file +
            changes.</span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;">Is there a way to tell clang/llvm to
            compile what I have written in the AST (using the Rewriter)
            without creating an intermediate file?</span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;"><br clear="none" class="yiv6792563898" style="">
          </span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;">Thanks a lot for your help,</span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="yiv6792563898" style="background-color:transparent;">Bogdan</span></div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
        <div class="yiv6792563898" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida           Grande', sans-serif; font-style: normal; background-color: transparent;"><br clear="none" class="yiv6792563898" style="">
        </div>
      </div></div>
      <br clear="none">
      <fieldset class="yiv6792563898mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>_______________________________________________
cfe-dev mailing list
<a rel="nofollow" shape="rect" class="yiv6792563898moz-txt-link-abbreviated" ymailto="mailto:cfe-dev@cs.uiuc.edu" target="_blank" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a rel="nofollow" shape="rect" class="yiv6792563898moz-txt-link-freetext" target="_blank" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
    
    <br clear="none">
  </div></div><br><br></div>  </div> </div>  </div> </div></body></html>