2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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

This commit is contained in:
火焚 富良 2022-11-11 13:15:50 +08:00 committed by GitHub
parent e2178f6c86
commit defc69d9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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