Tail call property for call sites (tarkasteve, issue #19)
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@81 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
parent
430c5cee9b
commit
64d54c49f0
2 changed files with 9 additions and 0 deletions
|
|
@ -568,6 +568,9 @@ _wrap_obj2obj(LLVMGetInstructionCallConv, LLVMValueRef, int)
|
|||
_wrap_objintenum2none(LLVMAddInstrAttribute, LLVMValueRef, LLVMAttribute)
|
||||
_wrap_objintenum2none(LLVMRemoveInstrAttribute, LLVMValueRef, LLVMAttribute)
|
||||
_wrap_objintint2none(LLVMSetInstrParamAlignment, LLVMValueRef)
|
||||
_wrap_obj2obj(LLVMIsTailCall, LLVMValueRef, int)
|
||||
_wrap_objint2none(LLVMSetTailCall, LLVMValueRef)
|
||||
|
||||
|
||||
/*===-- PHI Nodes --------------------------------------------------------===*/
|
||||
|
||||
|
|
@ -1371,6 +1374,8 @@ static PyMethodDef core_methods[] = {
|
|||
/* Call Sites (Call or Invoke) */
|
||||
_method( LLVMSetInstructionCallConv )
|
||||
_method( LLVMGetInstructionCallConv )
|
||||
_method( LLVMIsTailCall )
|
||||
_method( LLVMSetTailCall )
|
||||
_method( LLVMAddInstrAttribute )
|
||||
_method( LLVMRemoveInstrAttribute )
|
||||
_method( LLVMSetInstrParamAlignment )
|
||||
|
|
|
|||
|
|
@ -1404,6 +1404,10 @@ class CallOrInvokeInstruction(Instruction):
|
|||
def set_parameter_alignment(self, idx, align):
|
||||
_core.LLVMSetInstrParamAlignment(self.ptr, idx, align)
|
||||
|
||||
def _get_tc(self): return _core.LLVMIsTailCall(self.ptr)
|
||||
def _set_tc(self, value): _core.LLVMSetTailCall(self.ptr, value)
|
||||
tail_call = property(_get_tc, _set_tc)
|
||||
|
||||
|
||||
class PHINode(Instruction):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue