Hi<br><br>I was having just one more problem. I would like to find these datastructures/ primitive types etc inside a block, however the valuesymbol table is available only at a functional level. What can I do so as to get the number + type of datastructs(eg. arrays etc) inside a single block?<br>

<br><br>Thanks<br>Nipun<br><br><div class="gmail_quote">On Fri, Oct 31, 2008 at 12:05 PM, Devang Patel <span dir="ltr"><<a href="mailto:dpatel@apple.com" target="_blank">dpatel@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>Hi Nipun,<div><br><div><div><div>On Oct 30, 2008, at 9:31 PM, Nipun Arora wrote:</div>

<br><blockquote type="cite">Hi<div><br></div><div>I am trying to count the no of datastructures and the type, say for example the number of arrays in a given code. Which pass would give me this info? And what do I need to use in it?</div>


</blockquote><div><br></div></div>What are you trying to achieve here with this information ?</div><div><br></div><div>You can iterate over types to collect the info you need. For example,</div><div><br></div><div>TypeSymbolTable &TST = MyModule.getTypeSymbolTable();</div>


<div>for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != TE; ++TI) {</div><div><span style="white-space:pre">        </span>const Type *Ty = TI->second;<br></div><div>        ...</div><div>}</div><div><br>
</div>
<div><a href="http://llvm.org/docs/ProgrammersManual.html" target="_blank">http://llvm.org/docs/ProgrammersManual.html</a> is very useful document for beginners. </div><div><br></div><div><blockquote type="cite"><div>
<div><br></div> <div>Thanks for the help</div><div><br></div><div>Cheers</div><div>Nipun :)</div></div> _______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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></blockquote></div><br><div> <span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>


<div>-</div><div>Devang</div><div><br></div></div></span><br> </div><br></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>