Class DIBuilder
DIBuilder is a factory class for creating DebugInformation for an LLVM Module
public sealed class DIBuilder : IDIBuilder, IEquatable<IDIBuilder>, IDisposable, IEquatable<DIBuilder>
- Inheritance
-
DIBuilder
- Implements
- Inherited Members
Remarks
Many Debug information metadata nodes are created with unresolved references to additional metadata. To ensure such metadata is resolved applications should call the Finish() method to resolve and finalize the metadata. After this point only fully resolved nodes may be added to ensure that the data remains valid.
This type is a class to allow storing it as a member anywhere. It is NOT a member of Module but has one associated with it. Generally, at most one DICompileUnit is associated with a DIBuilder. If creating a function (via CreateFunction(DIScope?, LazyEncodedString, LazyEncodedString, DIFile?, uint, DISubroutineType?, bool, bool, uint, DebugInfoFlags, bool, Function)), then the creation of a DICompileUnit is required.
As this type implements IDisposable it OWNS the underlying native resource and callers must call Dispose() to free the underlying native resource.
Constructors
- DIBuilder(IModule)
Initializes a new instance of the DIBuilder class.
Properties
- CompileUnit
Gets the compile unit created by this builder [If any]
- IsDisposed
Gets a value indicating whether this instance is already disposed
- OwningModule
Gets the module associated with this builder
Methods
- AsAlias()
Gets an alias interface for this instance
- CreateArgument(DIScope?, LazyEncodedString, DIFile?, uint, DIType?, bool, DebugInfoFlags, ushort)
Creates an argument for a function as a DILocalVariable
- CreateArrayType(ulong, uint, DIType, IEnumerable<DINode>)
Creates debug information for an array type
- CreateArrayType(ulong, uint, DIType, DINodeArray)
Creates debug information for an array type
- CreateArrayType(ulong, uint, DIType, params DINode[])
Creates debug information for an array type
- CreateBasicType(LazyEncodedString, ulong, DiTypeKind, DebugInfoFlags)
Construct debug information for a basic type (a.k.a. primitive type)
- CreateCompileUnit(SourceLanguage, string, LazyEncodedString?, bool, LazyEncodedString?, uint)
Creates a new DICompileUnit
- CreateCompileUnit(SourceLanguage, LazyEncodedString, LazyEncodedString, LazyEncodedString?, bool, LazyEncodedString?, uint, LazyEncodedString?, LazyEncodedString?)
Creates a new DICompileUnit
- CreateConstantValueExpression(ulong)
Creates a DIExpression for a constant value
- CreateEnumerationType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, IEnumerable<DIEnumerator>, DIType?)
Creates an enumeration type
- CreateEnumeratorValue(LazyEncodedString, long, bool)
Creates a value for an enumeration
- CreateExpression(params IEnumerable<ExpressionOp>)
Creates a DIExpression from the provided ExpressionOps
- CreateFile(string?)
Creates a DIFile
- CreateFunction(DIScope?, LazyEncodedString, LazyEncodedString, DIFile?, uint, DISubroutineType?, bool, bool, uint, DebugInfoFlags, bool, Function)
Factory method to create a DISubProgram with debug information
- CreateGlobalVariableExpression(DINode?, LazyEncodedString, LazyEncodedString, DIFile?, uint, DIType?, bool, DIExpression?, DINode?, uint)
Creates a new DIGlobalVariableExpression
- CreateLocalVariable(DIScope?, LazyEncodedString, DIFile?, uint, DIType?, bool, DebugInfoFlags, uint)
Creates a DILocalVariable for a given scope
- CreateMemberType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, ulong, DebugInfoFlags, DIType?)
Creates a DIDerivedType for a member of a type
- CreatePointerType(DIType?, LazyEncodedString?, ulong, uint, uint)
Creates a pointer type with debug information
- CreateQualifiedType(DIType?, QualifiedTypeTag)
Creates a qualified type
- CreateReplaceableCompositeType(Tag, LazyEncodedString, DIScope?, DIFile?, uint, uint, ulong, uint, DebugInfoFlags, LazyEncodedString?)
Creates a replaceable composite type
- CreateStructType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, DebugInfoFlags, DIType?, IEnumerable<DINode>, uint, DIType?, LazyEncodedString?)
Creates debug description of a structure type
- CreateStructType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, DebugInfoFlags, DIType?, params DINode[])
Creates debug description of a structure type
- CreateSubRange(long, long)
Creates a new DISubRange
- CreateSubroutineType(DebugInfoFlags)
Creates a DISubroutineType to provide debug information for a function/procedure signature
- CreateSubroutineType(DebugInfoFlags, IEnumerable<DIType?>)
Creates a DISubroutineType to provide debug information for a function/procedure signature
- CreateSubroutineType(DebugInfoFlags, DIType?, IEnumerable<DIType?>)
Creates a DISubroutineType to provide debug information for a function/procedure signature
- CreateSubroutineType(DebugInfoFlags, params DIType?[])
Creates a DISubroutineType to provide debug information for a function/procedure signature
- CreateTempMacroFile(DIMacroFile?, uint, DIFile?)
Creates a debugging information temporary entry for a macro file
- CreateTypeArray(IEnumerable<DIType?>)
Create a debug metadata array of debug types
- CreateTypedef(DIType?, LazyEncodedString, DIFile?, uint, DINode?, uint)
Creates debug information for a type definition (e.g. type alias)
- CreateUnionType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, DebugInfoFlags, IEnumerable<DINode>, uint, LazyEncodedString?)
Creates debug description of a union type
- CreateUnionType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, DebugInfoFlags, DINodeArray)
Creates debug description of a union type
- CreateUnionType(DIScope?, LazyEncodedString, DIFile?, uint, ulong, uint, DebugInfoFlags, params DINode[])
Creates debug description of a union type
- CreateVectorType(ulong, uint, DIType, IEnumerable<DINode>)
Creates debug information for a vector type
- CreateVectorType(ulong, uint, DIType, DINodeArray)
Creates debug information for a vector type
- CreateVectorType(ulong, uint, DIType, params DINode[])
Creates debug information for a vector type
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- Equals(object?)
Determines whether the specified object is equal to the current object.
- Equals(DIBuilder?)
Indicates whether the current object is equal to another object of the same type.
- Equals(IDIBuilder?)
Indicates whether the current object is equal to another object of the same type.
- Finish()
Finalizes debug information for all items built by this builder
- Finish(DISubProgram)
Finalizes debug information for a single DISubProgram
- ForwardDeclareFunction(DIScope?, LazyEncodedString, LazyEncodedString, DIFile?, uint, DISubroutineType, bool, bool, uint, DebugInfoFlags, bool)
Creates a new forward declaration to a function
- GetHashCode()
Serves as the default hash function.
- GetOrCreateArray(IEnumerable<DINode>)
Gets or creates a node array with the specified elements
- GetOrCreateTypeArray(params IEnumerable<DIType>)
Gets or creates a Type array with the specified types
- InsertDeclare(Value, DILocalVariable, DIExpression, DILocation, Instruction)
Inserts an llvm.dbg.declare instruction before the given instruction
- InsertDeclare(Value, DILocalVariable, DIExpression, DILocation, BasicBlock)
Inserts a debug record before the given instruction
- InsertDeclare(Value, DILocalVariable, DILocation, Instruction)
Inserts an declare debug record for the given instruction
- InsertDeclare(Value, DILocalVariable, DILocation, BasicBlock)
Inserts a DebugRecord before the given instruction
- InsertValue(Value, DILocalVariable, DIExpression?, DILocation, Instruction)
Inserts a call to the llvm.dbg.value intrinsic before the specified instruction
- InsertValue(Value, DILocalVariable, DIExpression?, DILocation, BasicBlock)
Inserts a DebugRecord at the end of a basic block
- InsertValue(Value, DILocalVariable, DILocation, Instruction)
Inserts a debug record before the specified instruction
- InsertValue(Value, DILocalVariable, DILocation, BasicBlock)
Inserts a call to the llvm.dbg.value intrinsic at the end of a basic block