forked from M-Labs/artiq
1
0
Fork 0

py2llvm/fractions: use internal linkage for gcd function

This commit is contained in:
Sebastien Bourdeauducq 2014-09-24 19:21:45 +08:00
parent 8aebab580f
commit cf1f1269b2
1 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,9 @@ def _gcd(a, b):
def init_module(module): def init_module(module):
func_def = ast.parse(inspect.getsource(_gcd)).body[0] 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): def _reduce(builder, a, b):