<div dir="ltr">Hello,<div><br></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;line-height:19.5px">I would like to do transformations on AST of a c program but I need to have access to all ASTs created for the program to do right changes. LLVM processes one translation unit at a time and because of it, I do not have access to AST of all the translation units at the same time. Do you have any suggestion how I can access all the ASTs created for a program, do analysis on the ASTs and do modifications on the ASTs?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;line-height:19.5px">As a summary:</p><ol style="margin:0px 0px 1em 30px;padding:0px;border:0px;font-size:15px;color:rgb(36,39,41);font-family:arial,"helvetica neue",helvetica,sans-serif;line-height:19.5px"><li style="margin:0px 0px 0.5em;padding:0px;border:0px;word-wrap:break-word">I need to have access to ASTs of the program at the same time.</li><li style="margin:0px 0px 0.5em;padding:0px;border:0px;word-wrap:break-word">Do analysis on ASTs.</li><li style="margin:0px;padding:0px;border:0px;word-wrap:break-word">Modify ASTs based on my analysis and create llvm IR from modified ASTs.</li></ol><div><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px;line-height:19.5px">Thank you,</span></font></div></div><div><font color="#242729" face="arial, helvetica neue, helvetica, sans-serif"><span style="font-size:15px;line-height:19.5px">Anil</span></font></div></div>