Implement property CallOrInvokeInstruction.called_function
Also add a testcase.
This commit is contained in:
parent
5d14461c84
commit
5bd4991f0b
5 changed files with 20 additions and 1 deletions
|
|
@ -750,6 +750,12 @@ unsigned LLVMCmpInstGetPredicate(LLVMValueRef cmpinst)
|
|||
return instp->getPredicate();
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMInstGetCalledFunction(LLVMValueRef inst)
|
||||
{
|
||||
llvm::Instruction *instp = llvm::unwrap<llvm::Instruction>(inst);
|
||||
return llvm::wrap(CallSite(instp).getCalledFunction());
|
||||
}
|
||||
|
||||
/* llvm::unwrap a set of `n' wrapped objects starting at `values',
|
||||
* into a vector of pointers to llvm::unwrapped objects `out'. */
|
||||
template <typename W, typename UW>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue