Class DebugFunctionType
This class provides debug information binding for an IFunctionType and a DISubroutineType
Inherited Members
Namespace: Llvm.NET.DebugInfo
Assembly: Llvm.NET.dll
Syntax
public class DebugFunctionType : DebugType<IFunctionType, DISubroutineType>, IDebugType<IFunctionType, DISubroutineType>, ITypeHandleOwner, IFunctionType, ITypeRef, IExtensiblePropertyContainer
Remarks
Function signatures are unnamed interned types in LLVM. While there is usually a one to one mapping between an LLVM function signature type and the source language debug signature type - that isn't always true. In particular, when passing data by value. In cases where the address of a by value structure is needed, a common pattern is to use a pointer to the structure in the signature, then perform an Alloca + memcpy. The actual approach taken depends on the calling conventions of the target. In these cases you get an LLVM signature that doesn't match the source and could actually match another source function where a pointer to the structure is actually used in the source.
For example, the following two C language functions might use the same LLVM signature:
void foo(struct bar)
void foo2(struct bar*)
Implementing both of those might be done in LLVM with a single signature:
void (%struct.bar*)
This class is designed to provide mapping between the debug signature type and the underlying LLVM type
note
It is important to keep in mind that signatures are only concerned with types. That is, they do not include names of parameters. Parameter information is provided by CreateArgument(DIScope, String, DIFile, UInt32, DIType, Boolean, DebugInfoFlags, UInt16) and DebugInfoBuilder.InsertDeclare
Constructors
DebugFunctionType(IFunctionType, BitcodeModule, DebugInfoFlags, IDebugType<ITypeRef, DIType>, IDebugType<ITypeRef, DIType>[]) | Initializes a new instance of the DebugFunctionType class. |
Properties
IsVarArg | Gets a value indicating whether this signature is for a variadic function |
ParameterTypes | Gets the types of the parameters for the function |
ReturnType | Gets the return type of the function |