the called function equal NULL

Hi,

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

-------------------------------program----------------------------------------------------


if (isa(inst) || isa(inst)) {
const CallSite cs(inst);
if (cs.getCalledFunction() == NULL)
return dealAtIndirectCall(cs);
else
return dealAtDirectCall(cs);
}

A call to a value of function-pointer type, e.g.
void callit(void (*f)()) { f(); }

Virtual calls in C++ would also have no known called function.

John.

Than you John, It’s very nice of you.

Best Regards

2010-11-30