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)

public IStructType CreateStructType(LazyEncodedString name)

Parameters

name LazyEncodedString

Name 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)

public IStructType CreateStructType(bool packed, params IEnumerable<ITypeRef> elements)

Parameters

packed bool

Flag 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

public IStructType CreateStructType(LazyEncodedString name, bool packed, params IEnumerable<ITypeRef> elements)

Parameters

name LazyEncodedString

Name of the structure (use Empty for anonymous types)

packed bool

Flag 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