From 484c88af24bb876eace732dc5c049652d9982682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=AB=E7=84=9A=20=E5=AF=8C=E8=89=AF?= Date: Fri, 11 Nov 2022 13:15:50 +0800 Subject: [PATCH] compiler: fix const str/bytes handling (#1990) --- artiq/compiler/transforms/llvm_ir_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 881a9e717..cd54c372f 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -335,8 +335,8 @@ class LLVMIRGenerator: else: value = const.value - llptr = self.llstr_of_str(const.value, linkage="private", unnamed_addr=True) - lllen = ll.Constant(lli32, len(const.value)) + llptr = self.llstr_of_str(value, linkage="private", unnamed_addr=True) + lllen = ll.Constant(lli32, len(value)) return ll.Constant(llty, (llptr, lllen)) else: assert False