<div dir="ltr">The generally used way to do that that also scales well is:<div>- run tool on each TU, produce intermediate output for each TU (map phase)</div><div>- slurp in intermediate output and produce end-result you want (reduce phase)</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 17, 2015 at 6:37 AM Alexey Kutumov <<a href="mailto:alexey.kutumov@gmail.com">alexey.kutumov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I suppose that ASTImporter does not handle all AST nodes (i know that it cannot import `using` directives, it cannot import templates, also it cannot import pragmas and so on). I think that it can import only simple nodes (like structs, classes, functions).</div><div><br></div><div>I have branch (based on 3.6) <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_prograholic_clang_tree_odr-2Dcheck&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=Ci-RcwkMtj1HhDqZ6WcSimFe-XXVbMOTw5IQHEwcyW4&s=4E8E0dfgdt1-MCIx8AEhq8QLkywTEgBshahMC3q3xgQ&e=" target="_blank">https://github.com/prograholic/clang/tree/odr-check</a>. In this branch i'm trying to implement import of all possible nodes. But my branch is highly experimental.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-17 6:41 GMT+06:00 Uri Mann <span dir="ltr"><<a href="mailto:umann@symantec.com" target="_blank">umann@symantec.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone;<br>
<br>
I'm trying to create a tool which transforms source using a class derived from ASTFrontendAction. The tool need to transform one or more source files and then produce a final source file which can reference symbols from all of the processed source files. I tried to use ASTMergeAction class by saving the ASTUnit at the inside my class's EndSourceFileAction(). But when the files are merged, ASTImporter emits multiple errors "cannot import unsupported AST node xxx". Is this the right way to do it?<br>
<br>
Thanks in advance.<br>
-Uri<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>