Determine callee inside a custom calling convention


I am new to LLVM so bear with me if the answer to my question is obvious.
I am experimenting with a custom calling convention for X86, which I
hooked up in the tablegen'ed calling convention definition:

bool CC_X86_64_CustomCall(unsigned &ValNo, MVT &ValVT, MVT &LocVT,
                                                 CCValAssign::LocInfo &LocInfo,
&ArgFlags, CCState &State);

Inside this function, how to determine the callee?

With State.getMachineFunction() I only get the caller, but not the callee.

Thank you for your help!


The callee is normally irrelevant. What are you trying to do?