<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 18, 2012, at 12:54 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word"><div><div><div class="h5"><blockquote type="cite"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>So, to summarize what I said in an earlier mail, I would propose the following (if we decide we really want something along those lines):</div><div>- come up with an interface that clients like libclang would need; from what I can see that would be putting together all the dependencies of the Rewriter into an easy-to-instantiate bundle and having a covenience method to create an in-memory file on the source manager (from what I saw the proposed change does not use all the temp file magic, which is both the most brittle and what I don't expect anything bu the test to use)</div>

<div>- put that into a decently named class in Rewrite/; perhaps RewriterDependencies, or RewriterContext, or VirtualRewriterContext (to underline the use for virtual files)</div></div></div></div></div></blockquote><div>
<br></div></div></div>I think we're mostly in agreement here. VirtualRewriterContext in Rewrite would be fine by me.</div><div><br></div><div><div class="im"><blockquote type="cite"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>But to take a step back (and maybe I missed something) - doesn't libclang already have a way to instantiate everything needed for Rewriting a bunch of files?</div>

</div></div></div></div></blockquote><div><br></div></div><div>We're not rewriting files, we're rewriting text produced by calling Decl::print(). Since we'll be doing this a lot within libclang, we need to keep the context object around so we're not rebuilding the SourceManager, Lexer, etc.</div>
</div></div></blockquote><div><br></div><div style="">Makes sense. Sounds like we have a plan then... </div><div style=""><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style=""><span style="font-family:arial,sans-serif;font-size:13px">Fariborz, anything unclear?</span></div></div></div></div></div></blockquote><div><br></div>Yes (I may have another name for the header-file/class though).</div><div><br></div><div>- Fariborz</div><div><br><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div style=""><br></div><div style="">Cheers,</div><div style="">/Manuel</div></div></div></div></div>
_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>