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
|
|
@ -1501,6 +1501,12 @@ class CallOrInvokeInstruction(Instruction):
|
|||
def set_parameter_alignment(self, idx, align):
|
||||
_core.LLVMSetInstrParamAlignment(self.ptr, idx, align)
|
||||
|
||||
@property
|
||||
def called_function(self):
|
||||
function = _core.LLVMInstGetCalledFunction(self.ptr)
|
||||
if function: # Return value can be None on indirect call/invoke
|
||||
return _make_value(function)
|
||||
|
||||
# tail call is valid only for 'call', not 'invoke'
|
||||
# disabled for now
|
||||
#def _get_tc(self): return _core.LLVMIsTailCall(self.ptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue