I tried to add an indirect function call analysis in my pass. I found that the “!callees” metadata can be useful. I followed the API invocations in call graph generation using the !callees metadata (https://reviews.llvm.org/D39339). However, the result is not correct.
I looked at the bitcode that my pass was working on. Only a few places contain the !callees metadata in the bitcode. The project I am working with has way more indirect function calls. It seems that the bitcode does not contain a complete !callees metadata. I am wondering whether I need special flags for Clang to generate the bitcode with a complete !callees metadata information, or do I need to run some pass on the bitcode Clang generated in order to get all the !callees metadata.