From 9d20080624d2e2e96818f4865a2ba1eefb295fa0 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 21 Jul 2015 19:54:22 +0300 Subject: [PATCH] Use internal linkage for interior Python global values. --- artiq/compiler/transforms/llvm_ir_generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 49859355a..fa7364b51 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -84,6 +84,7 @@ class LLVMIRGenerator: name=self.llmodule.get_unique_name("str")) llconst.global_constant = True llconst.unnamed_addr = True + llconst.linkage = 'internal' llconst.initializer = ll.Constant(llstrty, bytearray(as_bytes)) return llconst.bitcast(ll.IntType(8).as_pointer()) else: @@ -118,6 +119,7 @@ class LLVMIRGenerator: llfunty = ll.FunctionType(args=llargtys, return_type=self.llty_of_type(func.type.ret, for_return=True)) self.llfunction = ll.Function(self.llmodule, llfunty, func.name) + self.llfunction.linkage = 'internal' self.llmap = {} self.llbuilder = ll.IRBuilder()