LLVMIRGenerator: handle self-referential class types.

This commit is contained in:
whitequark 2015-08-27 15:40:46 -05:00
parent 71ebe1778d
commit 84e32db622

View File

@ -270,6 +270,9 @@ class LLVMIRGenerator:
llty = self.llcontext.get_identified_type(name)
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)
for attrtyp in typ.attributes.values()]