[pypy-commit] pypy llvm-translation-backend: Make sure pypy_debug_catch_fatal_exception is defined before its use.

Manuel Jacob noreply at buildbot.pypy.org
Mon Jan 27 23:40:30 CET 2014


Author: Manuel Jacob
Branch: llvm-translation-backend
Changeset: r68970:dd59cd5364eb
Date: 2014-01-27 23:39 +0100
http://bitbucket.org/pypy/pypy/changeset/dd59cd5364eb/

Log:	Make sure pypy_debug_catch_fatal_exception is defined before its
	use.

diff --git a/rpython/translator/llvm/genllvm.py b/rpython/translator/llvm/genllvm.py
--- a/rpython/translator/llvm/genllvm.py
+++ b/rpython/translator/llvm/genllvm.py
@@ -1638,7 +1638,11 @@
             'ref': RefcountGCPolicy
         }[translator.config.translation.gctransformer](self)
         self.transformed_graphs = set()
-        self.sources = []
+        self.sources = [str(py.code.Source(r'''
+        void pypy_debug_catch_fatal_exception(void) {
+            fprintf(stderr, "Fatal RPython error\n");
+            abort();
+        }'''))]
         self.ecis = []
         self.entrypoints = set()
 
@@ -1750,11 +1754,6 @@
         exports.clear()
 
     def _compile(self, shared=False):
-        self.sources.append(str(py.code.Source(r'''
-        void pypy_debug_catch_fatal_exception(void) {
-            fprintf(stderr, "Fatal RPython error\n");
-            abort();
-        }''')))
         eci = ExternalCompilationInfo(
             includes=['stdio.h', 'stdlib.h'],
             separate_module_sources=['\n'.join(self.sources)],


More information about the pypy-commit mailing list