diff --git a/llvm/_core.c b/llvm/_core.c index 3d15ea1..423570d 100644 --- a/llvm/_core.c +++ b/llvm/_core.c @@ -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 ) diff --git a/llvm/core.py b/llvm/core.py index 64ca354..e7e444a 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -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):