Class DebugType<TNative, TDebug>
Base class for Debug types bound with an LLVM type
public class DebugType<TNative, TDebug> : IDebugType<TNative, TDebug>, ITypeRef, IEquatable<ITypeRef>, IEquatable<ITypeHandleOwner> where TNative : class, ITypeRef where TDebug : DIType
Type Parameters
TNative
Native LLVM type
TDebug
Debug type
- Inheritance
-
DebugType<TNative, TDebug>
- Implements
-
IDebugType<TNative, TDebug>IEquatable<ITypeHandleOwner>
- Derived
- Inherited Members
- Extension Methods
Remarks
This is a generic type that represents a binding between a specific LLVM type AND a DIType that describes it. This maintains the relationship between the two different reals and types systems.
Primitive types and function signature types are all interned in LLVM, thus there won't be a strict one to one relationship between an LLVM type and corresponding language specific debug type. (e.g. unsigned char, char, byte and signed byte might all be 8 bit integral values as far as LLVM is concerned.) Also, when using the pointer+alloca+memcpy pattern to pass by value the actual source debug info type is different than the LLVM function signature. This interface and it's implementations are used to construct native type and debug info pairing to allow applications to maintain a link from their AST or IR types into the LLVM native type and debug information.
note
It is important to note that the relationship from the DebugInfoType to it's NativeType properties is strictly ***one way***. That is, there is no way to take an arbitrary ITypeRef and re-associate it with the DebugInfoType or an implementation of this interface as there may be many such mappings to choose from.
Properties
- Context
Gets the ContextAlias that owns this type
- DebugInfoType
Gets or sets the Debug information type for this binding
- IntegerBitWidth
Gets the integer bit width of this type or 0 for non integer types
- IsDouble
Gets a value indicating whether the type is a 64-bit IEEE floating point type
- IsFloat
Gets a value indicating whether the type is a 32-bit IEEE floating point type
- IsFloatingPoint
Gets a value indicating whether this type is a floating point type
- IsInteger
Gets a value indicating whether this type is an integer
- IsPointer
Gets a value indicating whether this type is a pointer
- IsSequence
Gets a value indicating whether this type is a sequence type
- IsSized
Gets a value indicating whether the type is sized
- IsStruct
Gets a value indicating whether this type is a structure type
- IsVoid
Gets a value indicating whether this type represents the void type
- Kind
Gets the LLVM Type kind for this type
- NativeType
Gets the native LLVM type for this debug type binding
Methods
- CreateArrayType(uint)
Array type factory for an array with elements of this type
- CreateArrayType(IDIBuilder, uint, uint)
Creates a type defining an array of elements of this type
- CreatePointerType()
Get a IPointerType for a type that points to elements of this type in the default (0) address space
- CreatePointerType(uint)
Get a IPointerType for a type that points to elements of this type in the specified address space
- CreatePointerType(IDIBuilder, uint)
Creates a pointer to this type for a given module and address space
- GetNullValue()
Gets a null value (e.g. all bits == 0 ) for the type
Operators
- implicit operator TDebug?(DebugType<TNative, TDebug>)
Converts a DebugType<TNative, TDebug> to
TDebug
by accessing the DebugInfoType property