<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Nipun,<div><br><div><div>On Oct 30, 2008, at 9:31 PM, Nipun Arora wrote:</div><br class="Apple-interchange-newline"><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>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 class="Apple-tab-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">http://llvm.org/docs/ProgrammersManual.html</a> is very useful document for beginners. </div><div><br></div><div><blockquote type="cite"><div><br></div> <div>Thanks for the help</div><div><br></div><div>Cheers</div><div>Nipun :)</div> _______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br><div> <span class="Apple-style-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; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-</div><div>Devang</div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>