[LLVMdev] Utility function to identify user defined function

Hassan, Ahmad ahmad.hassan at sap.com
Tue Jan 22 08:37:56 PST 2013


Hi,

I would like to ask if LLVM provides a utility function like 'isMallocCall' to check if the 'call' instruction is calling some 'foo' user defined function?

If there is no such utility function then I am thinking to do this in the following way:

bool testFoo(CallInst *CI) {
Function *Callee = CI->getCalledFunction();
if (Callee->getName() == "foo")
    return true;
return false;
}


Thanks.

Cheers, Ahmad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130122/c153c4cb/attachment.html>


More information about the llvm-dev mailing list