From fcf5420803ad98b547aae7bc560447a06da8c6d2 Mon Sep 17 00:00:00 2001 From: Jon Riehl Date: Fri, 14 Jun 2013 15:59:51 -0500 Subject: [PATCH] Added argument naming to llpython.byte_translator. --- llpython/byte_translator.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llpython/byte_translator.py b/llpython/byte_translator.py index 5473f20..bcb2748 100644 --- a/llpython/byte_translator.py +++ b/llpython/byte_translator.py @@ -1,4 +1,5 @@ #! /usr/bin/env python +# -*- coding: utf-8 -*- # ______________________________________________________________________ '''Defines a bytecode based LLVM translator for llpython code. ''' @@ -197,6 +198,10 @@ class LLVMTranslator (BytecodeFlowVisitor): if self.llvm_function is None: self.llvm_function = self.llvm_module.add_function( self.llvm_type, self.target_function_name) + if self.llvm_function.args and not self.llvm_function.args[0].name: + for index in range(len(self.llvm_function.args)): + argname = self.code_obj.co_varnames[index] + self.llvm_function.args[index].name = argname self.llvm_blocks = {} self.llvm_definitions = {} self.pending_phis = {}