| DataLayout Class |
[This is preliminary documentation and is subject to change.]
Namespace: Llvm.NET
public class DataLayout : IDisposable
The DataLayout type exposes the following members.
| Name | Description | |
|---|---|---|
| Context | Context used for this data (in particular, for retrieving pointer types) | |
| Endianess | Retrieves the byte ordering for this target |
| Name | Description | |
|---|---|---|
| AbiAlignmentOf | Retrieves the ABI specified alignment, in bytes, for a specified type | |
| AbiBitAlignmentOf | ||
| AbiSizeOf | Retrieves the ABI specified size of the given type | |
| BitOffsetOfElement | ||
| BitSizeOf | Returns the number of bits necessary to hold the specified type. | |
| ByteSizeOf | ||
| CallFrameAlignmentOf | Retrieves the call frame alignment for a given type | |
| Dispose | Releases all resources used by the DataLayout | |
| Dispose(Boolean) | Releases the unmanaged resources used by the DataLayout and optionally releases the managed resources | |
| ElementAtOffset | ||
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | (Overrides ObjectFinalize.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IntPtrType | Retrieves an LLVM integer type with the same bit width as
a pointer for the default address space of the target | |
| IntPtrType(UInt32) | Retrieves an LLVM integer type with the same bit width as
a pointer for the given address space of the target | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| OffsetOfElement | ||
| Parse | Parses an LLVM target layout string | |
| PointerSize | Retrieves the size of a pointer for the default address space of the target | |
| PointerSize(UInt32) | Retrieves the size of a pointer for a given address space of the target | |
| PreferredAlignmentOf(ITypeRef) | ||
| PreferredAlignmentOf(Value) | ||
| PreferredBitAlignementOf | ||
| StoreSizeOf | Retrieves the number of bits required to store a value of the given type | |
| ToString | (Overrides ObjectToString.) |
There is a distinction between various sizes and alignment for a given type that are target dependent.
The following table illustrates the differences in sizes and their meaning for a sample set of types.
| Type | SizeInBits | StoreSizeInBits | AllocSizeInBits |
|---|---|---|---|
| i1 | 1 | 8 | 8 |
| i8 | 8 | 8 | 8 |
| i19 | 19 | 24 | 32 |
| i32 | 32 | 32 | 32 |
| i100 | 100 | 104 | 128 |
| i128 | 128 | 128 | 128 |
| Float | 32 | 32 | 32 |
| Double | 64 | 64 | 64 |
| X86_FP80 | 80 | 80 | 96 |
| The alloc size depends on the alignment, and thus on the target. The values in the example table are for x86-32-linux. |