[pypy-svn] r51289 - pypy/dist/pypy/translator/llvm

arigo at codespeak.net arigo at codespeak.net
Tue Feb 5 14:25:32 CET 2008


Author: arigo
Date: Tue Feb  5 14:25:28 2008
New Revision: 51289

Modified:
   pypy/dist/pypy/translator/llvm/funcnode.py
Log:
Only generate the "gc" annotation when the flag is defined.


Modified: pypy/dist/pypy/translator/llvm/funcnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/funcnode.py	(original)
+++ pypy/dist/pypy/translator/llvm/funcnode.py	Tue Feb  5 14:25:28 2008
@@ -124,7 +124,10 @@
 
     def getdecl(self):
         returntype, ref, args = self.getdecl_parts()
-        return '%s %s(%s) gc "gcrootsingle"' % (returntype, ref, ", ".join(args))
+        annotations = ''
+        if self.db.genllvm.config.translation.gcrootfinder == "llvmgc":
+            annotations += ' gc "gcrootsingle"'
+        return '%s %s(%s)%s' % (returntype, ref, ", ".join(args), annotations)
 
     # ______________________________________________________________________
     # helpers for block writers



More information about the Pypy-commit mailing list