mirror of https://github.com/m-labs/artiq.git
LLVMIRGenerator: handle self-referential class types.
This commit is contained in:
parent
71ebe1778d
commit
84e32db622
|
@ -270,6 +270,9 @@ class LLVMIRGenerator:
|
||||||
|
|
||||||
llty = self.llcontext.get_identified_type(name)
|
llty = self.llcontext.get_identified_type(name)
|
||||||
if llty.elements is None:
|
if llty.elements is None:
|
||||||
|
# First setting elements to [] will allow us to handle
|
||||||
|
# self-referential types.
|
||||||
|
llty.elements = []
|
||||||
llty.elements = [self.llty_of_type(attrtyp)
|
llty.elements = [self.llty_of_type(attrtyp)
|
||||||
for attrtyp in typ.attributes.values()]
|
for attrtyp in typ.attributes.values()]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue