<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On looking into the IR (dumped out in human readable format), I see that the class defined in the source code has been stripped out of its member functions and only a structure containing the member variables is created. The member functions are written out separately with their mangled names. Hence, I suspect if it is possible to iterate over only the member functions of a particular class. <br>
</blockquote><div><br></div><div>Indeed, as you've seen (& so far as I know), LLVM IR is too low level for your task - there are no member functions at this level, they've all been transformed into free functions and structs. <br>
<br>What kind of optimization were you hoping to implement based on this information? <br><br>If you aren't trying to implement an optimization, but instead try to process source code in some way (indexing, source to source transformations, etc) then you might want to use clang instead. </div>
</div>