<div>Hi,</div><div><br></div><div>I am writing an LLVM Pass and I would like to know how would I do the following:</div><div><br></div><div>1. I have a function <span style="font-style:italic">foo</span>, and I need to get all the call points calling this function in each Function of the Module. The only way I can think of is to iterate over the BasicBlocks of each Function, look for all the Call Instructions and check if the called function is <span style="font-style:italic">foo</span>. I was wondering if there is any other better way to do this.</div>
<div><br></div><div>2. Is it possible to distinguish a class method from a non class method while analyzing the emitted LLVM code for a C++ program? Because, I need to interpret the calls made to <span class="Apple-style-span" style="font-style: italic;">foo</span> differently in a class method and in a non class method.</div>
<div><br></div><div>Thanks,</div><div>Rakesh</div>