<div dir="ltr">Hi Ashish,<div><br></div><div style>I guess it will easier to answer the question if you provide some more details about what exactly you want to achieve. You can write an LLVM pass to visit all basic blocks and dump them to a file ( if thats what you want) - See [1].</div>
<div style><br></div><div style>[1]. <a href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 20, 2013 at 7:26 PM, Ashish Kulkarni <span dir="ltr"><<a href="mailto:ashish-kulkarni@hotmail.com" target="_blank">ashish-kulkarni@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><font face="Calibri" size="3">Hi </font><font face="Times New Roman"> LLVM developers</font><font face="Calibri" size="3">,</font><div><font face="Calibri" size="3"><br></font></div><div><font face="Calibri" size="3">   <span style="line-height:18px">I've been beginning to work with LLVM and I'm interested to know if there is a programmatic way to extract the control flow graph and/or basic blocks from LLVM/clang in order to do some analysis on them. Is there a way to get that ?</span></font></div>
<div><font face="Calibri" size="3"><span style="line-height:18px"><br></span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px">thank you in advance.</span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px"><br>
</span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px"><br></span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px">Regards,</span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px"><br>
</span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px">Kulkarni Ashish A.</span></font></div><div><font face="Calibri" size="3"><span style="line-height:18px">College of Engineering, Pune</span></font></div>
<div><font face="Calibri" size="3"><span style="line-height:18px">India.</span></font></div>                                    </div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>