[LLVMdev] Call graph node for function: 'main' Calls external node

Gener Omer omerigener at gmail.com
Tue May 4 11:26:01 PDT 2010


Hello,

On the following code,

//
#include <stdio.h>

void f2();

int main(){
    f2();
    return 0;
}

void f2(){
    printf("f2()\n");
}
//

I have obtained the .bc file and run

opt -print-callgraph finename.bc.

For the main function, the output of the above command is:

Call graph node for function: 'main'
  Calls external node

However, the function called by main(which is f2) is inside the module.

Is there any way to detect all function calls, including the one above and
those made via pointers to functions?

Thanks,
Gener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100504/67b90ebc/attachment.html>


More information about the llvm-dev mailing list