From cf1f1269b2f621c0a4159f061e25a3264494eca7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 24 Sep 2014 19:21:45 +0800 Subject: [PATCH] py2llvm/fractions: use internal linkage for gcd function --- artiq/py2llvm/fractions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/py2llvm/fractions.py b/artiq/py2llvm/fractions.py index 361bb8f79..5eeffb964 100644 --- a/artiq/py2llvm/fractions.py +++ b/artiq/py2llvm/fractions.py @@ -19,7 +19,9 @@ def _gcd(a, b): def init_module(module): func_def = ast.parse(inspect.getsource(_gcd)).body[0] - module.compile_function(func_def, {"a": VInt(64), "b": VInt(64)}) + function, _ = module.compile_function(func_def, + {"a": VInt(64), "b": VInt(64)}) + function.linkage = lc.LINKAGE_INTERNAL def _reduce(builder, a, b):