[LLVMdev] Can CallGraphSCCPass distinguish different function pointer types in CallGraphNode?

Heming Cui heming at cs.columbia.edu
Mon Jan 24 23:10:09 PST 2011


Dear folks,
    I am trying to handle function pointers at call graph, and I found that
the CallGraphSCCPass makes function pointers as external node, which is
actually an empty CallGraphNode (NULL pointer)?
    If I want to distinguish the function pointer types in the call graph
(and I also want the SCC order in CallGraphSCCPass), can I do that easily?
Or I have to inheritate the CallGraphSCCPass and handle function pointer
types in the call graph by myself?

   For example,

int aa(int i);

int main() {
int (*foo)(int);
foo = &aa;
foo(1);
}

     If I want to use the CallGraphSCCPass to get to know that the "foo"
pointer, which is an external node in the CallGraphSCCPass, actually has the
same function type the same as aa(int), how could I get this type
information from CallGraphSCCPass?

-- 
Regards,
Heming Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110125/128c2ae7/attachment.html>


More information about the llvm-dev mailing list