The function pointer call x() shows up as an indirect function call but the list of possible callees (foo and bar) are listed in metadata !callees !139.
We can use this information to get the exact list of candidates for some function pointer calls -- right now we are using the LLVM types to build the list of candidates but these can result in many false positives.
This program:
Produces the following LLVM IR:
The function pointer call
x()
shows up as an indirect function call but the list of possible callees (foo
andbar
) are listed in metadata!callees !139
.We can use this information to get the exact list of candidates for some function pointer calls -- right now we are using the LLVM types to build the list of candidates but these can result in many false positives.