From c6e12fd9299eb1b7fc884630e691ced9a7e711ce Mon Sep 17 00:00:00 2001 From: "mdevan.foobar" Date: Sun, 20 Sep 2009 12:33:22 +0000 Subject: [PATCH] Disabled tail call for now, works only on call instructions git-svn-id: http://llvm-py.googlecode.com/svn/trunk@82 8d1e9007-1d4e-0410-b67e-1979fd6579aa --- llvm/core.py | 8 +++++--- test/testall.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/llvm/core.py b/llvm/core.py index e7e444a..11e7b9e 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -1404,9 +1404,11 @@ 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) + # tail call is valid only for 'call', not 'invoke' + # disabled for now + #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): diff --git a/test/testall.py b/test/testall.py index e16cf47..e379b46 100755 --- a/test/testall.py +++ b/test/testall.py @@ -329,6 +329,8 @@ def do_callorinvokeinstruction(): i.add_parameter_attribute(0, ATTR_SEXT) i.remove_parameter_attribute(0, ATTR_SEXT) i.set_parameter_alignment(0, 8) + #tc = i.tail_call + #i.tail_call = 1 def do_phinode():