[LLVMdev] Re: questions (fwd)

Vikram S. Adve vadve at cs.uiuc.edu
Thu Nov 21 16:00:01 PST 2002


> > If it is a function pointer, is it easy to get all the possible 
> > functions that have the signature (i guess the DSGraph would be 
> > helpful here)?
> 
> No, there is no easy way.  Given a DSGraph, you could ask for 
> the DSNode corresponding to the function pointer, then get a 
> list of globals in that node.  That would provide the list 
> you need.  Note that this is only valid if the "incomplete" 
> bit is not set on the node.  If it is, then you must assume 
> ALL functions can get called.


Minor exception:  you can exclude functions *with prototypes* that do
not match the type of the function pointer (since, in LLVM, a call to a
function with an incompatible signature would have to be done by first
casting the pointer type).

--Vikram






More information about the llvm-dev mailing list