[pypy-svn] r16030 - pypy/dist/pypy/translator/llvm2

ericvrp at codespeak.net ericvrp at codespeak.net
Sat Aug 13 10:51:55 CEST 2005


Author: ericvrp
Date: Sat Aug 13 10:51:54 2005
New Revision: 16030

Modified:
   pypy/dist/pypy/translator/llvm2/opwriter.py
Log:
quick fix (identical to what rxe did for calls) for invoke function that returns pointer to function


Modified: pypy/dist/pypy/translator/llvm2/opwriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm2/opwriter.py	(original)
+++ pypy/dist/pypy/translator/llvm2/opwriter.py	Sat Aug 13 10:51:54 2005
@@ -299,6 +299,8 @@
         exc_label   = block_label + '_exception_handling'
 
         if returntype != "void":
+            if self.db.is_function_ptr(op.result):
+                returntype = "%s (%s)*" % (returntype, ", ".join(argtypes))
             self.codewriter.invoke(targetvar, returntype, functionref, argrefs,
                                    argtypes, none_label, exc_label)
         else:



More information about the Pypy-commit mailing list