Is there a way to get called function from a Machine Instruction?
Right now I'm identifying if the Machine Instruction is a function call or not as below:
for (MachineBasicBlock &MBB : MF) {
for (MachineInstr &MI : MBB) {
if (MI.getDesc().isCall()) {
//Function Call
}
}
I tried to follow this http://lists.llvm.org/pipermail/llvm-dev/2015-July/088100.html, but I'm getting isSymbol() as false in all cases.
Note: I'm interested only in direct calls(function pointers are ignored).