forked from M-Labs/artiq
1
0
Fork 0

compiler: allow empty list in quote

This commit is contained in:
pca006132 2021-07-02 15:16:19 +08:00
parent 0806b67dbf
commit 6fb31a7abb
1 changed files with 1 additions and 1 deletions

View File

@ -1510,7 +1510,7 @@ class LLVMIRGenerator:
llelts = [self._quote(value[i], elt_type, lambda: path() + [str(i)]) llelts = [self._quote(value[i], elt_type, lambda: path() + [str(i)])
for i in range(len(value))] for i in range(len(value))]
else: else:
assert False, fail_msg llelts = []
lleltsary = ll.Constant(ll.ArrayType(self.llty_of_type(elt_type), len(llelts)), lleltsary = ll.Constant(ll.ArrayType(self.llty_of_type(elt_type), len(llelts)),
list(llelts)) list(llelts))
name = self.llmodule.scope.deduplicate("quoted.{}".format(kind_name)) name = self.llmodule.scope.deduplicate("quoted.{}".format(kind_name))