--- a/LLVMType.st Wed Oct 07 06:10:55 2015 +0100
+++ b/LLVMType.st Mon Oct 12 20:52:13 2015 +0100
@@ -229,6 +229,27 @@
!LLVMType class methodsFor:'types - structures'!
+named: aString
+ "Create an (opaque) named structure with no members (elements).
+ Use LLVMStructType>>elementTypes: to set members.
+
+ This method comes handy when one needs to create
+ a recursive type, such as an element of linked list:
+
+ | listElemTy |
+
+ listElemTy := LLVMType named: 'listElemTy'.
+ listElemTy elementTypes: { LLVMType int32 . listElemTy pointer }.
+ listElemTy
+
+ "
+
+ self assertIsString: aString.
+ ^ LLVM StructCreateNamed: LLVM GetGlobalContext _: aString.
+
+ "Created: / 12-10-2015 / 14:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
struct: memberTypes
^ self struct: memberTypes packed: false