Can now modify called_function of CallOrInvokeInstruction
This commit is contained in:
parent
507ff73061
commit
b9d05bb6fe
4 changed files with 19 additions and 3 deletions
|
|
@ -1670,12 +1670,16 @@ class CallOrInvokeInstruction(Instruction):
|
|||
def set_parameter_alignment(self, idx, align):
|
||||
_core.LLVMSetInstrParamAlignment(self.ptr, idx, align)
|
||||
|
||||
@property
|
||||
def called_function(self):
|
||||
def _get_called_function(self):
|
||||
function = _core.LLVMInstGetCalledFunction(self.ptr)
|
||||
if function: # Return value can be None on indirect call/invoke
|
||||
return _make_value(function)
|
||||
|
||||
def _set_called_function(self, function):
|
||||
_core.LLVMInstSetCalledFunction(self.ptr, function.ptr)
|
||||
|
||||
called_function = property(_get_called_function, _set_called_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