[LLVMdev] getCalledFunction
Umar Janjua
Umar.Janjua at cl.cam.ac.uk
Mon Aug 29 13:32:53 PDT 2005
Hi,
The getCalledFunction on CallInst is returning NULL, although it is (directly)
calling a function, which is defined in the same file.
----------------------
if (CallInst* callInst = dyn_cast<CallInst>(&inst))
{
std::cerr<<callInst->getCalledFunction();
}
-----------------------
When
------------------
std::cerr<<*callInst
----------------
the output is.
%tmp.10 = call int (...)* cast (int ()* %releaseLock to int (...)*)( )
; <int> [#uses=0]
Note:
releaseLock is defined in the same file and is not called as function pointer.
Do I require some other pass information beforehand.
More information about the llvm-dev
mailing list