Method CreateStructType
CreateStructType(LazyEncodedString)
Create an opaque structure type (e.g. a forward reference)
IStructType CreateStructType(LazyEncodedString name)
Parameters
name
LazyEncodedStringName of the type (use Empty for anonymous types)
Returns
- IStructType
New type
Remarks
This method creates an opaque type. The SetBody(bool, params IEnumerable<ITypeRef>) method provides a means to add a body, including indication of packed status, to an opaque type at a later time if the details of the body are required. (If only pointers to the type are required then the body isn't required)
CreateStructType(bool, params IEnumerable<ITypeRef>)
Create an anonymous structure type (e.g. Tuple)
IStructType CreateStructType(bool packed, params IEnumerable<ITypeRef> elements)
Parameters
packed
boolFlag to indicate if the structure is "packed"
elements
IEnumerable<ITypeRef>Types of the fields of the structure
Returns
- IStructType
IStructType with the specified body defined.
CreateStructType(LazyEncodedString, bool, params IEnumerable<ITypeRef>)
Creates a new structure type in this Ubiquity.NET.Llvm.ContextAlias
IStructType CreateStructType(LazyEncodedString name, bool packed, params IEnumerable<ITypeRef> elements)
Parameters
name
LazyEncodedStringName of the structure (use Empty for anonymous types)
packed
boolFlag indicating if the structure is packed
elements
IEnumerable<ITypeRef>Types for the structures elements in layout order
Returns
- IStructType
IStructType with the specified body defined.
Remarks
If the elements argument list is empty then a complete 0 sized struct is created