From defc69d9c377e34c3b192de70d83c10f1955790f 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