Table of Contents

Method CreateStructType

Namespace
Ubiquity.NET.Llvm
Assembly
Ubiquity.NET.Llvm.dll

CreateStructType(LazyEncodedString)

Create an opaque structure type (e.g. a forward reference)

IStructType CreateStructType(LazyEncodedString name)

Parameters

name LazyEncodedString

Name of the type (use Ubiquity.NET.InteropHelpers.LazyEncodedString.Empty for anonymous types)

Returns

IStructType

New type

Remarks

This method creates an opaque type. The SetBody(bool, params 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 ITypeRef[])

Create an anonymous structure type (e.g. Tuple)

IStructType CreateStructType(bool packed, params ITypeRef[] elements)

Parameters

packed bool

Flag to indicate if the structure is "packed"

elements ITypeRef[]

Types of the fields of the structure

Returns

IStructType

IStructType with the specified body defined.

CreateStructType(LazyEncodedString, bool, params ITypeRef[])

Creates a new structure type in this Ubiquity.NET.Llvm.ContextAlias

IStructType CreateStructType(LazyEncodedString name, bool packed, params ITypeRef[] elements)

Parameters

name LazyEncodedString

Name of the structure (use Ubiquity.NET.InteropHelpers.LazyEncodedString.Empty for anonymous types)

packed bool

Flag indicating if the structure is packed

elements 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