[LLVMdev] the called function equal NULL

huwei8717 huwei8717 at yahoo.com.cn
Mon Nov 29 17:22:01 PST 2010


Hi,

I have a llvm-pass in hand written by other people. There are following statements that I couldn't understand:

-------------------------------program----------------------------------------------------
...
if (isa<CallInst>(inst) || isa<InvokeInst>(inst)) {
    const CallSite cs(inst);
    if (cs.getCalledFunction() == NULL)
      return dealAtIndirectCall(cs);
    else
      return dealAtDirectCall(cs);
}
...
-------------------------------------------------------------------------------------------

My question is:

When does the called function equal NULL, could you give an example?  I mean what kind of call in source code could change to this case in llvm-IR, could you give an example?

Thank you for your time.

Best Regards

2010-11-30 



WeiHu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101130/d8195167/attachment.html>


More information about the llvm-dev mailing list