2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-02-07 16:15:22 +08:00

compiler: fix const str/bytes handling (#1990)

This commit is contained in:
火焚 富良 2022-11-11 13:15:50 +08:00 committed by Sebastien Bourdeauducq
parent 1b3fa3429d
commit b50d30ba5b

View File

@ -331,8 +331,8 @@ class LLVMIRGenerator:
else: else:
value = const.value value = const.value
llptr = self.llstr_of_str(const.value, linkage="private", unnamed_addr=True) llptr = self.llstr_of_str(value, linkage="private", unnamed_addr=True)
lllen = ll.Constant(lli32, len(const.value)) lllen = ll.Constant(lli32, len(value))
return ll.Constant(llty, (llptr, lllen)) return ll.Constant(llty, (llptr, lllen))
else: else:
assert False assert False