class DIBuilder

Declaration

class DIBuilder { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/DIBuilder.h:41

Member Variables

private llvm::Module& M
private llvm::LLVMContext& VMContext
private llvm::DICompileUnit* CUNode
The one compile unit created by this DIBuiler.
private llvm::Function* DeclareFn
llvm.dbg.declare
private llvm::Function* ValueFn
llvm.dbg.value
private llvm::Function* LabelFn
llvm.dbg.label
private llvm::Function* AddrFn
llvm.dbg.addr
private SmallVector<llvm::Metadata*, 4> AllEnumTypes
private SmallVector<llvm::TrackingMDNodeRef, 4> AllRetainTypes
Track the RetainTypes, since they can be updated later on.
private SmallVector<llvm::Metadata*, 4> AllSubprograms
private SmallVector<llvm::Metadata*, 4> AllGVs
private SmallVector<llvm::TrackingMDNodeRef, 4> AllImportedModules
private MapVector<llvm::MDNode*, SetVector<llvm::Metadata*>> AllMacrosPerParent
Map Macro parent (which can be DIMacroFile or nullptr) to a list of Metadata all of type DIMacroNode. DIMacroNode's with nullptr parent are DICompileUnit direct children.
private SmallVector<llvm::TrackingMDNodeRef, 4> UnresolvedNodes
Track nodes that may be unresolved.
private bool AllowUnresolvedNodes
private DenseMap<llvm::MDNode*, SmallVector<llvm::TrackingMDNodeRef, 1>> PreservedVariables
Do not use a std::vector. Some versions of libc++ apparently copy instead of move on grow operations, and TrackingMDRef is expensive to copy.
private DenseMap<llvm::MDNode*, SmallVector<llvm::TrackingMDNodeRef, 1>> PreservedLabels
Each subprogram's preserved labels.

Method Overview

  • public DIBuilder(llvm::Module & M, bool AllowUnresolved = true, llvm::DICompileUnit * CU = nullptr)
  • public DIBuilder(const llvm::DIBuilder &)
  • public llvm::DICompositeType * createArrayType(uint64_t Size, uint32_t AlignInBits, llvm::DIType * Ty, llvm::DINodeArray Subscripts, PointerUnion<llvm::DIExpression *, llvm::DIVariable *> DataLocation = nullptr, PointerUnion<llvm::DIExpression *, llvm::DIVariable *> Associated = nullptr, PointerUnion<llvm::DIExpression *, llvm::DIVariable *> Allocated = nullptr, PointerUnion<llvm::DIExpression *, llvm::DIVariable *> Rank = nullptr)
  • public static llvm::DISubprogram * createArtificialSubprogram(llvm::DISubprogram * SP)
  • public static llvm::DIType * createArtificialType(llvm::DIType * Ty)
  • public llvm::DILocalVariable * createAutoVariable(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, llvm::DIType * Ty, bool AlwaysPreserve = false, DINode::DIFlags Flags = DINode::FlagZero, uint32_t AlignInBits = 0)
  • public llvm::DIBasicType * createBasicType(llvm::StringRef Name, uint64_t SizeInBits, unsigned int Encoding, DINode::DIFlags Flags = DINode::FlagZero)
  • public llvm::DIDerivedType * createBitFieldMemberType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, llvm::DIType * Ty, llvm::DINodeArray Annotations = nullptr)
  • public llvm::DICompositeType * createClassType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, llvm::DIType * DerivedFrom, llvm::DINodeArray Elements, llvm::DIType * VTableHolder = nullptr, llvm::MDNode * TemplateParms = nullptr, llvm::StringRef UniqueIdentifier = "")
  • public llvm::DICommonBlock * createCommonBlock(llvm::DIScope * Scope, llvm::DIGlobalVariable * decl, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo)
  • public llvm::DICompileUnit * createCompileUnit(unsigned int Lang, llvm::DIFile * File, llvm::StringRef Producer, bool isOptimized, llvm::StringRef Flags, unsigned int RV, llvm::StringRef SplitName = llvm::StringRef(), DICompileUnit::DebugEmissionKind Kind = DICompileUnit::DebugEmissionKind::FullDebug, uint64_t DWOId = 0, bool SplitDebugInlining = true, bool DebugInfoForProfiling = false, DICompileUnit::DebugNameTableKind NameTableKind = DICompileUnit::DebugNameTableKind::Default, bool RangesBaseAddress = false, llvm::StringRef SysRoot = {}, llvm::StringRef SDK = {})
  • public llvm::DIExpression * createConstantValueExpression(uint64_t Val)
  • public llvm::DICompositeType * createEnumerationType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, llvm::DINodeArray Elements, llvm::DIType * UnderlyingType, llvm::StringRef UniqueIdentifier = "", bool IsScoped = false)
  • public llvm::DIEnumerator * createEnumerator(llvm::StringRef Name, const llvm::APSInt & Value)
  • public llvm::DIEnumerator * createEnumerator(llvm::StringRef Name, uint64_t Val, bool IsUnsigned = false)
  • public llvm::DIExpression * createExpression(ArrayRef<uint64_t> Addr = None)
  • public llvm::DIFile * createFile(llvm::StringRef Filename, llvm::StringRef Directory, Optional<DIFile::ChecksumInfo<StringRef>> Checksum = None, Optional<llvm::StringRef> Source = None)
  • public llvm::DICompositeType * createForwardDecl(unsigned int Tag, llvm::StringRef Name, llvm::DIScope * Scope, llvm::DIFile * F, unsigned int Line, unsigned int RuntimeLang = 0, uint64_t SizeInBits = 0, uint32_t AlignInBits = 0, llvm::StringRef UniqueIdentifier = "")
  • public llvm::DIDerivedType * createFriend(llvm::DIType * Ty, llvm::DIType * FriendTy)
  • public llvm::DISubprogram * createFunction(llvm::DIScope * Scope, llvm::StringRef Name, llvm::StringRef LinkageName, llvm::DIFile * File, unsigned int LineNo, llvm::DISubroutineType * Ty, unsigned int ScopeLine, DINode::DIFlags Flags = DINode::FlagZero, DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero, llvm::DITemplateParameterArray TParams = nullptr, llvm::DISubprogram * Decl = nullptr, llvm::DITypeArray ThrownTypes = nullptr, llvm::DINodeArray Annotations = nullptr, llvm::StringRef TargetFuncName = "")
  • public llvm::DIGlobalVariableExpression * createGlobalVariableExpression(llvm::DIScope * Context, llvm::StringRef Name, llvm::StringRef LinkageName, llvm::DIFile * File, unsigned int LineNo, llvm::DIType * Ty, bool IsLocalToUnit, bool isDefined = true, llvm::DIExpression * Expr = nullptr, llvm::MDNode * Decl = nullptr, llvm::MDTuple * TemplateParams = nullptr, uint32_t AlignInBits = 0, llvm::DINodeArray Annotations = nullptr)
  • public llvm::DIImportedEntity * createImportedDeclaration(llvm::DIScope * Context, llvm::DINode * Decl, llvm::DIFile * File, unsigned int Line, llvm::StringRef Name = "", llvm::DINodeArray Elements = nullptr)
  • public llvm::DIImportedEntity * createImportedModule(llvm::DIScope * Context, llvm::DIModule * M, llvm::DIFile * File, unsigned int Line, llvm::DINodeArray Elements = nullptr)
  • public llvm::DIImportedEntity * createImportedModule(llvm::DIScope * Context, llvm::DIImportedEntity * NS, llvm::DIFile * File, unsigned int Line, llvm::DINodeArray Elements = nullptr)
  • public llvm::DIImportedEntity * createImportedModule(llvm::DIScope * Context, llvm::DINamespace * NS, llvm::DIFile * File, unsigned int Line, llvm::DINodeArray Elements = nullptr)
  • public llvm::DIDerivedType * createInheritance(llvm::DIType * Ty, llvm::DIType * BaseTy, uint64_t BaseOffset, uint32_t VBPtrOffset, DINode::DIFlags Flags)
  • public llvm::DILabel * createLabel(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, bool AlwaysPreserve = false)
  • public llvm::DILexicalBlock * createLexicalBlock(llvm::DIScope * Scope, llvm::DIFile * File, unsigned int Line, unsigned int Col)
  • public llvm::DILexicalBlockFile * createLexicalBlockFile(llvm::DIScope * Scope, llvm::DIFile * File, unsigned int Discriminator = 0)
  • public llvm::DIMacro * createMacro(llvm::DIMacroFile * Parent, unsigned int Line, unsigned int MacroType, llvm::StringRef Name, llvm::StringRef Value = llvm::StringRef())
  • public llvm::DIDerivedType * createMemberPointerType(llvm::DIType * PointeeTy, llvm::DIType * Class, uint64_t SizeInBits, uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagZero)
  • public llvm::DIDerivedType * createMemberType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, llvm::DIType * Ty, llvm::DINodeArray Annotations = nullptr)
  • public llvm::DISubprogram * createMethod(llvm::DIScope * Scope, llvm::StringRef Name, llvm::StringRef LinkageName, llvm::DIFile * File, unsigned int LineNo, llvm::DISubroutineType * Ty, unsigned int VTableIndex = 0, int ThisAdjustment = 0, llvm::DIType * VTableHolder = nullptr, DINode::DIFlags Flags = DINode::FlagZero, DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero, llvm::DITemplateParameterArray TParams = nullptr, llvm::DITypeArray ThrownTypes = nullptr)
  • public llvm::DIModule * createModule(llvm::DIScope * Scope, llvm::StringRef Name, llvm::StringRef ConfigurationMacros, llvm::StringRef IncludePath, llvm::StringRef APINotesFile = {}, llvm::DIFile * File = nullptr, unsigned int LineNo = 0, bool IsDecl = false)
  • public llvm::DINamespace * createNameSpace(llvm::DIScope * Scope, llvm::StringRef Name, bool ExportSymbols)
  • public llvm::DIBasicType * createNullPtrType()
  • public llvm::DIDerivedType * createObjCIVar(llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, llvm::DIType * Ty, llvm::MDNode * PropertyNode)
  • public llvm::DIObjCProperty * createObjCProperty(llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, llvm::StringRef GetterName, llvm::StringRef SetterName, unsigned int PropertyAttributes, llvm::DIType * Ty)
  • public static llvm::DIType * createObjectPointerType(llvm::DIType * Ty)
  • public llvm::DILocalVariable * createParameterVariable(llvm::DIScope * Scope, llvm::StringRef Name, unsigned int ArgNo, llvm::DIFile * File, unsigned int LineNo, llvm::DIType * Ty, bool AlwaysPreserve = false, DINode::DIFlags Flags = DINode::FlagZero, llvm::DINodeArray Annotations = nullptr)
  • public llvm::DIDerivedType * createPointerType(llvm::DIType * PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits = 0, Optional<unsigned int> DWARFAddressSpace = None, llvm::StringRef Name = "", llvm::DINodeArray Annotations = nullptr)
  • public llvm::DIDerivedType * createQualifiedType(unsigned int Tag, llvm::DIType * FromTy)
  • public llvm::DIDerivedType * createReferenceType(unsigned int Tag, llvm::DIType * RTy, uint64_t SizeInBits = 0, uint32_t AlignInBits = 0, Optional<unsigned int> DWARFAddressSpace = None)
  • public llvm::DICompositeType * createReplaceableCompositeType(unsigned int Tag, llvm::StringRef Name, llvm::DIScope * Scope, llvm::DIFile * F, unsigned int Line, unsigned int RuntimeLang = 0, uint64_t SizeInBits = 0, uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl, llvm::StringRef UniqueIdentifier = "", llvm::DINodeArray Annotations = nullptr)
  • public llvm::DIDerivedType * createSetType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, uint64_t SizeInBits, uint32_t AlignInBits, llvm::DIType * Ty)
  • public llvm::DIDerivedType * createStaticMemberType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, llvm::DIType * Ty, DINode::DIFlags Flags, llvm::Constant * Val, uint32_t AlignInBits = 0)
  • public llvm::DIStringType * createStringType(llvm::StringRef Name, llvm::DIExpression * StringLengthExp, llvm::DIExpression * StrLocationExp = nullptr)
  • public llvm::DIStringType * createStringType(llvm::StringRef Name, llvm::DIVariable * StringLength, llvm::DIExpression * StrLocationExp = nullptr)
  • public llvm::DIStringType * createStringType(llvm::StringRef Name, uint64_t SizeInBits)
  • public llvm::DICompositeType * createStructType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, llvm::DIType * DerivedFrom, llvm::DINodeArray Elements, unsigned int RunTimeLang = 0, llvm::DIType * VTableHolder = nullptr, llvm::StringRef UniqueIdentifier = "")
  • public llvm::DISubroutineType * createSubroutineType(llvm::DITypeRefArray ParameterTypes, DINode::DIFlags Flags = DINode::FlagZero, unsigned int CC = 0)
  • public llvm::DISubprogram * createTempFunctionFwdDecl(llvm::DIScope * Scope, llvm::StringRef Name, llvm::StringRef LinkageName, llvm::DIFile * File, unsigned int LineNo, llvm::DISubroutineType * Ty, unsigned int ScopeLine, DINode::DIFlags Flags = DINode::FlagZero, DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero, llvm::DITemplateParameterArray TParams = nullptr, llvm::DISubprogram * Decl = nullptr, llvm::DITypeArray ThrownTypes = nullptr)
  • public llvm::DIGlobalVariable * createTempGlobalVariableFwdDecl(llvm::DIScope * Context, llvm::StringRef Name, llvm::StringRef LinkageName, llvm::DIFile * File, unsigned int LineNo, llvm::DIType * Ty, bool IsLocalToUnit, llvm::MDNode * Decl = nullptr, llvm::MDTuple * TemplateParams = nullptr, uint32_t AlignInBits = 0)
  • public llvm::DIMacroFile * createTempMacroFile(llvm::DIMacroFile * Parent, unsigned int Line, llvm::DIFile * File)
  • public llvm::DITemplateValueParameter * createTemplateParameterPack(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIType * Ty, llvm::DINodeArray Val)
  • public llvm::DITemplateValueParameter * createTemplateTemplateParameter(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIType * Ty, llvm::StringRef Val)
  • public llvm::DITemplateTypeParameter * createTemplateTypeParameter(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIType * Ty, bool IsDefault)
  • public llvm::DITemplateValueParameter * createTemplateValueParameter(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIType * Ty, bool IsDefault, llvm::Constant * Val)
  • public llvm::DIDerivedType * createTypedef(llvm::DIType * Ty, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, llvm::DIScope * Context, uint32_t AlignInBits = 0, llvm::DINodeArray Annotations = nullptr)
  • public llvm::DICompositeType * createUnionType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, llvm::DINodeArray Elements, unsigned int RunTimeLang = 0, llvm::StringRef UniqueIdentifier = "")
  • public llvm::DIBasicType * createUnspecifiedParameter()
  • public llvm::DIBasicType * createUnspecifiedType(llvm::StringRef Name)
  • public llvm::DIDerivedType * createVariantMemberType(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, llvm::Constant * Discriminant, DINode::DIFlags Flags, llvm::DIType * Ty)
  • public llvm::DICompositeType * createVariantPart(llvm::DIScope * Scope, llvm::StringRef Name, llvm::DIFile * File, unsigned int LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, llvm::DIDerivedType * Discriminator, llvm::DINodeArray Elements, llvm::StringRef UniqueIdentifier = "")
  • public llvm::DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, llvm::DIType * Ty, llvm::DINodeArray Subscripts)
  • public void finalize()
  • public void finalizeSubprogram(llvm::DISubprogram * SP)
  • public llvm::DINodeArray getOrCreateArray(ArrayRef<llvm::Metadata *> Elements)
  • public llvm::DIGenericSubrange * getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride)
  • public llvm::DIMacroNodeArray getOrCreateMacroArray(ArrayRef<llvm::Metadata *> Elements)
  • public llvm::DISubrange * getOrCreateSubrange(llvm::Metadata * Count, llvm::Metadata * LowerBound, llvm::Metadata * UpperBound, llvm::Metadata * Stride)
  • public llvm::DISubrange * getOrCreateSubrange(int64_t Lo, llvm::Metadata * CountNode)
  • public llvm::DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
  • public llvm::DITypeRefArray getOrCreateTypeArray(ArrayRef<llvm::Metadata *> Elements)
  • public llvm::Instruction * insertDbgAddrIntrinsic(llvm::Value * Addr, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::Instruction * InsertBefore)
  • private llvm::Instruction * insertDbgAddrIntrinsic(llvm::Value * Val, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertBB, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertDbgAddrIntrinsic(llvm::Value * Addr, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertAtEnd)
  • private llvm::Instruction * insertDbgIntrinsic(llvm::Function * Intrinsic, llvm::Value * Val, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertBB, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertDbgValueIntrinsic(llvm::Value * Val, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::Instruction * InsertBefore)
  • private llvm::Instruction * insertDbgValueIntrinsic(llvm::Value * Val, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertBB, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertDbgValueIntrinsic(llvm::Value * Val, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertAtEnd)
  • private llvm::Instruction * insertDeclare(llvm::Value * Storage, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertBB, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertDeclare(llvm::Value * Storage, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertDeclare(llvm::Value * Storage, llvm::DILocalVariable * VarInfo, llvm::DIExpression * Expr, const llvm::DILocation * DL, llvm::BasicBlock * InsertAtEnd)
  • public llvm::Instruction * insertLabel(llvm::DILabel * LabelInfo, const llvm::DILocation * DL, llvm::Instruction * InsertBefore)
  • public llvm::Instruction * insertLabel(llvm::DILabel * LabelInfo, const llvm::DILocation * DL, llvm::BasicBlock * InsertAtEnd)
  • private llvm::Instruction * insertLabel(llvm::DILabel * LabelInfo, const llvm::DILocation * DL, llvm::BasicBlock * InsertBB, llvm::Instruction * InsertBefore)
  • public void replaceArrays(llvm::DICompositeType *& T, llvm::DINodeArray Elements, llvm::DINodeArray TParams = llvm::MDTupleTypedArrayWrapper<llvm::DINode>())
  • public template <class NodeTy>NodeTy * replaceTemporary(llvm::TempMDNode && N, NodeTy * Replacement)
  • public void replaceVTableHolder(llvm::DICompositeType *& T, llvm::DIType * VTableHolder)
  • public void retainType(llvm::DIScope * T)
  • private void trackIfUnresolved(llvm::MDNode * N)

Methods

DIBuilder(llvm::Module& M,
          bool AllowUnresolved = true,
          llvm::DICompileUnit* CU = nullptr)

Description

Construct a builder for a module. If \c AllowUnresolved, collect unresolved nodes attached to the module in order to resolve cycles during \a finalize(). If \p CU is given a value other than nullptr, then set \p CUNode to CU.

Declared at: llvm/include/llvm/IR/DIBuilder.h:116

Parameters

llvm::Module& M
bool AllowUnresolved = true
llvm::DICompileUnit* CU = nullptr

DIBuilder(const llvm::DIBuilder&)

Declared at: llvm/include/llvm/IR/DIBuilder.h:118

Parameters

const llvm::DIBuilder&

llvm::DICompositeType* createArrayType(
    uint64_t Size,
    uint32_t AlignInBits,
    llvm::DIType* Ty,
    llvm::DINodeArray Subscripts,
    PointerUnion<llvm::DIExpression*,
                 llvm::DIVariable*> DataLocation =
        nullptr,
    PointerUnion<llvm::DIExpression*,
                 llvm::DIVariable*> Associated =
        nullptr,
    PointerUnion<llvm::DIExpression*,
                 llvm::DIVariable*> Allocated =
        nullptr,
    PointerUnion<llvm::DIExpression*,
                 llvm::DIVariable*> Rank =
        nullptr)

Description

Create debugging information entry for an array.

Declared at: llvm/include/llvm/IR/DIBuilder.h:550

Parameters

uint64_t Size
Array size.
uint32_t AlignInBits
Alignment.
llvm::DIType* Ty
Element type.
llvm::DINodeArray Subscripts
Subscripts.
PointerUnion<llvm::DIExpression*, llvm::DIVariable*> DataLocation = nullptr
The location of the raw data of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*.
PointerUnion<llvm::DIExpression*, llvm::DIVariable*> Associated = nullptr
The associated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*.
PointerUnion<llvm::DIExpression*, llvm::DIVariable*> Allocated = nullptr
The allocated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*.
PointerUnion<llvm::DIExpression*, llvm::DIVariable*> Rank = nullptr
The rank attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*.

static llvm::DISubprogram*
createArtificialSubprogram(llvm::DISubprogram* SP)

Description

Create a distinct clone of \p SP with FlagArtificial set.

Declared at: llvm/include/llvm/IR/DIBuilder.h:606

Parameters

llvm::DISubprogram* SP

static llvm::DIType* createArtificialType(
    llvm::DIType* Ty)

Description

Create a uniqued clone of \p Ty with FlagArtificial set.

Declared at: llvm/include/llvm/IR/DIBuilder.h:609

Parameters

llvm::DIType* Ty

llvm::DILocalVariable* createAutoVariable(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIType* Ty,
    bool AlwaysPreserve = false,
    DINode::DIFlags Flags = DINode::FlagZero,
    uint32_t AlignInBits = 0)

Description

Create a new descriptor for an auto variable. This is a local variable that is not a subprogram parameter. \c Scope must be a \a DILocalScope, and thus its scope chain eventually leads to a \a DISubprogram. If \c AlwaysPreserve, this variable will be referenced from its containing subprogram, and will survive some optimizations.

Declared at: llvm/include/llvm/IR/DIBuilder.h:697

Parameters

llvm::DIScope* Scope
llvm::StringRef Name
llvm::DIFile* File
unsigned int LineNo
llvm::DIType* Ty
bool AlwaysPreserve = false
DINode::DIFlags Flags = DINode::FlagZero
uint32_t AlignInBits = 0

llvm::DIBasicType* createBasicType(
    llvm::StringRef Name,
    uint64_t SizeInBits,
    unsigned int Encoding,
    DINode::DIFlags Flags = DINode::FlagZero)

Description

Create debugging information entry for a basic type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:214

Parameters

llvm::StringRef Name
Type name.
uint64_t SizeInBits
Size of the type.
unsigned int Encoding
DWARF encoding code, e.g., dwarf::DW_ATE_float.
DINode::DIFlags Flags = DINode::FlagZero
Optional DWARF attributes, e.g., DW_AT_endianity.

llvm::DIDerivedType* createBitFieldMemberType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    uint64_t SizeInBits,
    uint64_t OffsetInBits,
    uint64_t StorageOffsetInBits,
    DINode::DIFlags Flags,
    llvm::DIType* Ty,
    llvm::DINodeArray Annotations = nullptr)

Description

Create debugging information entry for a bit field member.

Declared at: llvm/include/llvm/IR/DIBuilder.h:356

Parameters

llvm::DIScope* Scope
Member scope.
llvm::StringRef Name
Member name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNo
Line number.
uint64_t SizeInBits
Member size.
uint64_t OffsetInBits
Member offset.
uint64_t StorageOffsetInBits
Member storage offset.
DINode::DIFlags Flags
Flags to encode member attribute.
llvm::DIType* Ty
Parent type.
llvm::DINodeArray Annotations = nullptr
Member annotations.

llvm::DICompositeType* createClassType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    uint64_t OffsetInBits,
    DINode::DIFlags Flags,
    llvm::DIType* DerivedFrom,
    llvm::DINodeArray Elements,
    llvm::DIType* VTableHolder = nullptr,
    llvm::MDNode* TemplateParms = nullptr,
    llvm::StringRef UniqueIdentifier = "")

Description

Create debugging information entry for a class.

Declared at: llvm/include/llvm/IR/DIBuilder.h:427

Parameters

llvm::DIScope* Scope
Scope in which this class is defined.
llvm::StringRef Name
class name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNumber
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
uint64_t OffsetInBits
Member offset.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIType* DerivedFrom
llvm::DINodeArray Elements
class members.
llvm::DIType* VTableHolder = nullptr
Debug info of the base class that contains vtable for this type. This is used in DW_AT_containing_type. See DWARF documentation for more info.
llvm::MDNode* TemplateParms = nullptr
Template type parameters.
llvm::StringRef UniqueIdentifier = ""
A unique identifier for the class.

llvm::DICommonBlock* createCommonBlock(
    llvm::DIScope* Scope,
    llvm::DIGlobalVariable* decl,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo)

Description

Create common block entry for a Fortran common block.

Declared at: llvm/include/llvm/IR/DIBuilder.h:813

Parameters

llvm::DIScope* Scope
Scope of this common block.
llvm::DIGlobalVariable* decl
Global variable declaration.
llvm::StringRef Name
The name of this common block.
llvm::DIFile* File
The file this common block is defined.
unsigned int LineNo
Line number.

llvm::DICompileUnit* createCompileUnit(
    unsigned int Lang,
    llvm::DIFile* File,
    llvm::StringRef Producer,
    bool isOptimized,
    llvm::StringRef Flags,
    unsigned int RV,
    llvm::StringRef SplitName = llvm::StringRef(),
    DICompileUnit::DebugEmissionKind Kind =
        DICompileUnit::DebugEmissionKind::
            FullDebug,
    uint64_t DWOId = 0,
    bool SplitDebugInlining = true,
    bool DebugInfoForProfiling = false,
    DICompileUnit::DebugNameTableKind
        NameTableKind = DICompileUnit::
            DebugNameTableKind::Default,
    bool RangesBaseAddress = false,
    llvm::StringRef SysRoot = {},
    llvm::StringRef SDK = {})

Description

A CompileUnit provides an anchor for all debugging information generated during this instance of compilation.

Declared at: llvm/include/llvm/IR/DIBuilder.h:156

Parameters

unsigned int Lang
Source programming language, eg. dwarf::DW_LANG_C99
llvm::DIFile* File
File info.
llvm::StringRef Producer
Identify the producer of debugging information and code. Usually this is a compiler version string.
bool isOptimized
A boolean flag which indicates whether optimization is enabled or not.
llvm::StringRef Flags
This string lists command line options. This string is directly embedded in debug info output which may be used by a tool analyzing generated debugging information.
unsigned int RV
This indicates runtime version for languages like Objective-C.
llvm::StringRef SplitName = llvm::StringRef()
The name of the file that we'll split debug info out into.
DICompileUnit::DebugEmissionKind Kind = DICompileUnit::DebugEmissionKind::FullDebug
The kind of debug information to generate.
uint64_t DWOId = 0
The DWOId if this is a split skeleton compile unit.
bool SplitDebugInlining = true
Whether to emit inline debug info.
bool DebugInfoForProfiling = false
Whether to emit extra debug info for profile collection.
DICompileUnit::DebugNameTableKind NameTableKind = DICompileUnit::DebugNameTableKind::Default
Whether to emit .debug_gnu_pubnames, .debug_pubnames, or no pubnames at all.
bool RangesBaseAddress = false
llvm::StringRef SysRoot = {}
The clang system root (value of -isysroot).
llvm::StringRef SDK = {}
The SDK name. On Darwin, this is the last component of the sysroot.

llvm::DIExpression* createConstantValueExpression(
    uint64_t Val)

Description

Create an expression for a variable that does not have an address, but does have a constant value.

Declared at: llvm/include/llvm/IR/DIBuilder.h:735

Parameters

uint64_t Val

llvm::DICompositeType* createEnumerationType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    llvm::DINodeArray Elements,
    llvm::DIType* UnderlyingType,
    llvm::StringRef UniqueIdentifier = "",
    bool IsScoped = false)

Description

Create debugging information entry for an enumeration.

Declared at: llvm/include/llvm/IR/DIBuilder.h:577

Parameters

llvm::DIScope* Scope
Scope in which this enumeration is defined.
llvm::StringRef Name
Union name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNumber
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
llvm::DINodeArray Elements
Enumeration elements.
llvm::DIType* UnderlyingType
Underlying type of a C++11/ObjC fixed enum.
llvm::StringRef UniqueIdentifier = ""
A unique identifier for the enum.
bool IsScoped = false
Boolean flag indicate if this is C++11/ObjC 'enum class'.

llvm::DIEnumerator* createEnumerator(
    llvm::StringRef Name,
    const llvm::APSInt& Value)

Description

Create a single enumerator value.

Declared at: llvm/include/llvm/IR/DIBuilder.h:198

Parameters

llvm::StringRef Name
const llvm::APSInt& Value

llvm::DIEnumerator* createEnumerator(
    llvm::StringRef Name,
    uint64_t Val,
    bool IsUnsigned = false)

Declared at: llvm/include/llvm/IR/DIBuilder.h:199

Parameters

llvm::StringRef Name
uint64_t Val
bool IsUnsigned = false

llvm::DIExpression* createExpression(
    ArrayRef<uint64_t> Addr = None)

Description

Create a new descriptor for the specified variable which has a complex address expression for its address.

Declared at: llvm/include/llvm/IR/DIBuilder.h:731

Parameters

ArrayRef<uint64_t> Addr = None
An array of complex address operations.

llvm::DIFile* createFile(
    llvm::StringRef Filename,
    llvm::StringRef Directory,
    Optional<DIFile::ChecksumInfo<StringRef>>
        Checksum = None,
    Optional<llvm::StringRef> Source = None)

Description

Create a file descriptor to hold debugging information for a file.

Declared at: llvm/include/llvm/IR/DIBuilder.h:175

Parameters

llvm::StringRef Filename
File name.
llvm::StringRef Directory
Directory.
Optional<DIFile::ChecksumInfo<StringRef>> Checksum = None
Optional checksum kind (e.g. CSK_MD5, CSK_SHA1, etc.) and value.
Optional<llvm::StringRef> Source = None
Optional source text.

llvm::DICompositeType* createForwardDecl(
    unsigned int Tag,
    llvm::StringRef Name,
    llvm::DIScope* Scope,
    llvm::DIFile* F,
    unsigned int Line,
    unsigned int RuntimeLang = 0,
    uint64_t SizeInBits = 0,
    uint32_t AlignInBits = 0,
    llvm::StringRef UniqueIdentifier = "")

Description

Create a permanent forward-declared type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:616

Parameters

unsigned int Tag
llvm::StringRef Name
llvm::DIScope* Scope
llvm::DIFile* F
unsigned int Line
unsigned int RuntimeLang = 0
uint64_t SizeInBits = 0
uint32_t AlignInBits = 0
llvm::StringRef UniqueIdentifier = ""

llvm::DIDerivedType* createFriend(
    llvm::DIType* Ty,
    llvm::DIType* FriendTy)

Description

Create debugging information entry for a 'friend'.

Declared at: llvm/include/llvm/IR/DIBuilder.h:292

Parameters

llvm::DIType* Ty
llvm::DIType* FriendTy

llvm::DISubprogram* createFunction(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::StringRef LinkageName,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DISubroutineType* Ty,
    unsigned int ScopeLine,
    DINode::DIFlags Flags = DINode::FlagZero,
    DISubprogram::DISPFlags SPFlags =
        DISubprogram::SPFlagZero,
    llvm::DITemplateParameterArray TParams =
        nullptr,
    llvm::DISubprogram* Decl = nullptr,
    llvm::DITypeArray ThrownTypes = nullptr,
    llvm::DINodeArray Annotations = nullptr,
    llvm::StringRef TargetFuncName = "")

Description

Create a new descriptor for the specified subprogram. See comments in DISubprogram* for descriptions of these fields.

Declared at: llvm/include/llvm/IR/DIBuilder.h:758

Parameters

llvm::DIScope* Scope
Function scope.
llvm::StringRef Name
Function name.
llvm::StringRef LinkageName
Mangled function name.
llvm::DIFile* File
File where this variable is defined.
unsigned int LineNo
Line number.
llvm::DISubroutineType* Ty
Function type.
unsigned int ScopeLine
Set to the beginning of the scope this starts
DINode::DIFlags Flags = DINode::FlagZero
e.g. is this function prototyped or not. These flags are used to emit dwarf attributes.
DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero
Additional flags specific to subprograms.
llvm::DITemplateParameterArray TParams = nullptr
Function template parameters.
llvm::DISubprogram* Decl = nullptr
llvm::DITypeArray ThrownTypes = nullptr
Exception types this function may throw.
llvm::DINodeArray Annotations = nullptr
Attribute Annotations.
llvm::StringRef TargetFuncName = ""
The name of the target function if this is a trampoline.

llvm::DIGlobalVariableExpression*
createGlobalVariableExpression(
    llvm::DIScope* Context,
    llvm::StringRef Name,
    llvm::StringRef LinkageName,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIType* Ty,
    bool IsLocalToUnit,
    bool isDefined = true,
    llvm::DIExpression* Expr = nullptr,
    llvm::MDNode* Decl = nullptr,
    llvm::MDTuple* TemplateParams = nullptr,
    uint32_t AlignInBits = 0,
    llvm::DINodeArray Annotations = nullptr)

Description

Create a new descriptor for the specified variable.

Declared at: llvm/include/llvm/IR/DIBuilder.h:674

Parameters

llvm::DIScope* Context
Variable scope.
llvm::StringRef Name
Name of the variable.
llvm::StringRef LinkageName
Mangled name of the variable.
llvm::DIFile* File
File where this variable is defined.
unsigned int LineNo
Line number.
llvm::DIType* Ty
Variable Type.
bool IsLocalToUnit
Boolean flag indicate whether this variable is externally visible or not.
bool isDefined = true
llvm::DIExpression* Expr = nullptr
The location of the global relative to the attached GlobalVariable.
llvm::MDNode* Decl = nullptr
Reference to the corresponding declaration.
llvm::MDTuple* TemplateParams = nullptr
uint32_t AlignInBits = 0
Variable alignment(or 0 if no alignment attr was specified)
llvm::DINodeArray Annotations = nullptr

llvm::DIImportedEntity* createImportedDeclaration(
    llvm::DIScope* Context,
    llvm::DINode* Decl,
    llvm::DIFile* File,
    unsigned int Line,
    llvm::StringRef Name = "",
    llvm::DINodeArray Elements = nullptr)

Description

Create a descriptor for an imported function.

Declared at: llvm/include/llvm/IR/DIBuilder.h:903

Parameters

llvm::DIScope* Context
The scope this module is imported into.
llvm::DINode* Decl
The declaration (or definition) of a function, type, or variable.
llvm::DIFile* File
File where the declaration is located.
unsigned int Line
Line number of the declaration.
llvm::StringRef Name = ""
llvm::DINodeArray Elements = nullptr
Renamed elements.

llvm::DIImportedEntity* createImportedModule(
    llvm::DIScope* Context,
    llvm::DIModule* M,
    llvm::DIFile* File,
    unsigned int Line,
    llvm::DINodeArray Elements = nullptr)

Description

Create a descriptor for an imported module.

Declared at: llvm/include/llvm/IR/DIBuilder.h:892

Parameters

llvm::DIScope* Context
The scope this module is imported into.
llvm::DIModule* M
The module being imported here
llvm::DIFile* File
File where the declaration is located.
unsigned int Line
Line number of the declaration.
llvm::DINodeArray Elements = nullptr
Renamed elements.

llvm::DIImportedEntity* createImportedModule(
    llvm::DIScope* Context,
    llvm::DIImportedEntity* NS,
    llvm::DIFile* File,
    unsigned int Line,
    llvm::DINodeArray Elements = nullptr)

Description

Create a descriptor for an imported module.

Declared at: llvm/include/llvm/IR/DIBuilder.h:881

Parameters

llvm::DIScope* Context
The scope this module is imported into.
llvm::DIImportedEntity* NS
An aliased namespace.
llvm::DIFile* File
File where the declaration is located.
unsigned int Line
Line number of the declaration.
llvm::DINodeArray Elements = nullptr
Renamed elements.

llvm::DIImportedEntity* createImportedModule(
    llvm::DIScope* Context,
    llvm::DINamespace* NS,
    llvm::DIFile* File,
    unsigned int Line,
    llvm::DINodeArray Elements = nullptr)

Description

Create a descriptor for an imported module.

Declared at: llvm/include/llvm/IR/DIBuilder.h:871

Parameters

llvm::DIScope* Context
The scope this module is imported into
llvm::DINamespace* NS
The namespace being imported here.
llvm::DIFile* File
File where the declaration is located.
unsigned int Line
Line number of the declaration.
llvm::DINodeArray Elements = nullptr
Renamed elements.

llvm::DIDerivedType* createInheritance(
    llvm::DIType* Ty,
    llvm::DIType* BaseTy,
    uint64_t BaseOffset,
    uint32_t VBPtrOffset,
    DINode::DIFlags Flags)

Description

Create debugging information entry to establish inheritance relationship between two types.

Declared at: llvm/include/llvm/IR/DIBuilder.h:302

Parameters

llvm::DIType* Ty
Original type.
llvm::DIType* BaseTy
Base type. Ty is inherits from base.
uint64_t BaseOffset
Base offset.
uint32_t VBPtrOffset
Virtual base pointer offset.
DINode::DIFlags Flags
Flags to describe inheritance attribute, e.g. private

llvm::DILabel* createLabel(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    bool AlwaysPreserve = false)

Description

Create a new descriptor for an label. \c Scope must be a \a DILocalScope, and thus its scope chain eventually leads to a \a DISubprogram.

Declared at: llvm/include/llvm/IR/DIBuilder.h:707

Parameters

llvm::DIScope* Scope
llvm::StringRef Name
llvm::DIFile* File
unsigned int LineNo
bool AlwaysPreserve = false

llvm::DILexicalBlock* createLexicalBlock(
    llvm::DIScope* Scope,
    llvm::DIFile* File,
    unsigned int Line,
    unsigned int Col)

Description

This creates a descriptor for a lexical block with the specified parent context.

Declared at: llvm/include/llvm/IR/DIBuilder.h:862

Parameters

llvm::DIScope* Scope
Parent lexical scope.
llvm::DIFile* File
Source file.
unsigned int Line
Line number.
unsigned int Col
Column number.

llvm::DILexicalBlockFile* createLexicalBlockFile(
    llvm::DIScope* Scope,
    llvm::DIFile* File,
    unsigned int Discriminator = 0)

Description

This creates a descriptor for a lexical block with a new file attached. This merely extends the existing lexical block as it crosses a file.

Declared at: llvm/include/llvm/IR/DIBuilder.h:853

Parameters

llvm::DIScope* Scope
Lexical block.
llvm::DIFile* File
Source file.
unsigned int Discriminator = 0
DWARF path discriminator value.

llvm::DIMacro* createMacro(
    llvm::DIMacroFile* Parent,
    unsigned int Line,
    unsigned int MacroType,
    llvm::StringRef Name,
    llvm::StringRef Value = llvm::StringRef())

Description

Create debugging information entry for a macro.

Declared at: llvm/include/llvm/IR/DIBuilder.h:185

Parameters

llvm::DIMacroFile* Parent
Macro parent (could be nullptr).
unsigned int Line
Source line number where the macro is defined.
unsigned int MacroType
DW_MACINFO_define or DW_MACINFO_undef.
llvm::StringRef Name
Macro name.
llvm::StringRef Value = llvm::StringRef()
Macro value.

llvm::DIDerivedType* createMemberPointerType(
    llvm::DIType* PointeeTy,
    llvm::DIType* Class,
    uint64_t SizeInBits,
    uint32_t AlignInBits = 0,
    DINode::DIFlags Flags = DINode::FlagZero)

Description

Create debugging information entry for a pointer to member.

Declared at: llvm/include/llvm/IR/DIBuilder.h:266

Parameters

llvm::DIType* PointeeTy
Type pointed to by this pointer.
llvm::DIType* Class
Type for which this pointer points to members of.
uint64_t SizeInBits
Size.
uint32_t AlignInBits = 0
Alignment. (optional)
DINode::DIFlags Flags = DINode::FlagZero

llvm::DIDerivedType* createMemberType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    uint64_t OffsetInBits,
    DINode::DIFlags Flags,
    llvm::DIType* Ty,
    llvm::DINodeArray Annotations = nullptr)

Description

Create debugging information entry for a member.

Declared at: llvm/include/llvm/IR/DIBuilder.h:317

Parameters

llvm::DIScope* Scope
Member scope.
llvm::StringRef Name
Member name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNo
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
uint64_t OffsetInBits
Member offset.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIType* Ty
Parent type.
llvm::DINodeArray Annotations = nullptr
Member annotations.

llvm::DISubprogram* createMethod(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::StringRef LinkageName,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DISubroutineType* Ty,
    unsigned int VTableIndex = 0,
    int ThisAdjustment = 0,
    llvm::DIType* VTableHolder = nullptr,
    DINode::DIFlags Flags = DINode::FlagZero,
    DISubprogram::DISPFlags SPFlags =
        DISubprogram::SPFlagZero,
    llvm::DITemplateParameterArray TParams =
        nullptr,
    llvm::DITypeArray ThrownTypes = nullptr)

Description

Create a new descriptor for the specified C++ method. See comments in \a DISubprogram* for descriptions of these fields.

Declared at: llvm/include/llvm/IR/DIBuilder.h:798

Parameters

llvm::DIScope* Scope
Function scope.
llvm::StringRef Name
Function name.
llvm::StringRef LinkageName
Mangled function name.
llvm::DIFile* File
File where this variable is defined.
unsigned int LineNo
Line number.
llvm::DISubroutineType* Ty
Function type.
unsigned int VTableIndex = 0
Index no of this method in virtual table, or -1u if unrepresentable.
int ThisAdjustment = 0
MS ABI-specific adjustment of 'this' that occurs in the prologue.
llvm::DIType* VTableHolder = nullptr
Type that holds vtable.
DINode::DIFlags Flags = DINode::FlagZero
e.g. is this function prototyped or not. This flags are used to emit dwarf attributes.
DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero
Additional flags specific to subprograms.
llvm::DITemplateParameterArray TParams = nullptr
Function template parameters.
llvm::DITypeArray ThrownTypes = nullptr
Exception types this function may throw.

llvm::DIModule* createModule(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::StringRef ConfigurationMacros,
    llvm::StringRef IncludePath,
    llvm::StringRef APINotesFile = {},
    llvm::DIFile* File = nullptr,
    unsigned int LineNo = 0,
    bool IsDecl = false)

Description

This creates new descriptor for a module with the specified parent scope.

Declared at: llvm/include/llvm/IR/DIBuilder.h:842

Parameters

llvm::DIScope* Scope
Parent scope
llvm::StringRef Name
Name of this module
llvm::StringRef ConfigurationMacros
A space-separated shell-quoted list of -D macro definitions as they would appear on a command line.
llvm::StringRef IncludePath
The path to the module map file.
llvm::StringRef APINotesFile = {}
The path to an API notes file for this module.
llvm::DIFile* File = nullptr
Source file of the module. Used for Fortran modules.
unsigned int LineNo = 0
Source line number of the module. Used for Fortran modules.
bool IsDecl = false
This is a module declaration; default to false; when set to true, only Scope and Name are required as this entry is just a hint for the debugger to find the corresponding definition in the global scope.

llvm::DINamespace* createNameSpace(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    bool ExportSymbols)

Description

This creates new descriptor for a namespace with the specified parent scope.

Declared at: llvm/include/llvm/IR/DIBuilder.h:822

Parameters

llvm::DIScope* Scope
Namespace scope
llvm::StringRef Name
Name of this namespace
bool ExportSymbols
True for C++ inline namespaces.

llvm::DIBasicType* createNullPtrType()

Description

Create C++11 nullptr type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:206

llvm::DIDerivedType* createObjCIVar(
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    uint64_t OffsetInBits,
    DINode::DIFlags Flags,
    llvm::DIType* Ty,
    llvm::MDNode* PropertyNode)

Description

Create debugging information entry for Objective-C instance variable.

Declared at: llvm/include/llvm/IR/DIBuilder.h:391

Parameters

llvm::StringRef Name
Member name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNo
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
uint64_t OffsetInBits
Member offset.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIType* Ty
Parent type.
llvm::MDNode* PropertyNode
Property associated with this ivar.

llvm::DIObjCProperty* createObjCProperty(
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    llvm::StringRef GetterName,
    llvm::StringRef SetterName,
    unsigned int PropertyAttributes,
    llvm::DIType* Ty)

Description

Create debugging information entry for Objective-C property.

Declared at: llvm/include/llvm/IR/DIBuilder.h:405

Parameters

llvm::StringRef Name
Property name.
llvm::DIFile* File
File where this property is defined.
unsigned int LineNumber
Line number.
llvm::StringRef GetterName
Name of the Objective C property getter selector.
llvm::StringRef SetterName
Name of the Objective C property setter selector.
unsigned int PropertyAttributes
Objective C property attributes.
llvm::DIType* Ty
Type.

static llvm::DIType* createObjectPointerType(
    llvm::DIType* Ty)

Description

Create a uniqued clone of \p Ty with FlagObjectPointer and FlagArtificial set.

Declared at: llvm/include/llvm/IR/DIBuilder.h:613

Parameters

llvm::DIType* Ty

llvm::DILocalVariable* createParameterVariable(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    unsigned int ArgNo,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIType* Ty,
    bool AlwaysPreserve = false,
    DINode::DIFlags Flags = DINode::FlagZero,
    llvm::DINodeArray Annotations = nullptr)

Description

Create a new descriptor for a parameter variable. \c Scope must be a \a DILocalScope, and thus its scope chain eventually leads to a \a DISubprogram. \c ArgNo is the index (starting from \c 1) of this variable in the subprogram parameters. \c ArgNo should not conflict with other parameters of the same subprogram. If \c AlwaysPreserve, this variable will be referenced from its containing subprogram, and will survive some optimizations.

Declared at: llvm/include/llvm/IR/DIBuilder.h:722

Parameters

llvm::DIScope* Scope
llvm::StringRef Name
unsigned int ArgNo
llvm::DIFile* File
unsigned int LineNo
llvm::DIType* Ty
bool AlwaysPreserve = false
DINode::DIFlags Flags = DINode::FlagZero
llvm::DINodeArray Annotations = nullptr

llvm::DIDerivedType* createPointerType(
    llvm::DIType* PointeeTy,
    uint64_t SizeInBits,
    uint32_t AlignInBits = 0,
    Optional<unsigned int> DWARFAddressSpace =
        None,
    llvm::StringRef Name = "",
    llvm::DINodeArray Annotations = nullptr)

Description

Create debugging information entry for a pointer.

Declared at: llvm/include/llvm/IR/DIBuilder.h:255

Parameters

llvm::DIType* PointeeTy
Type pointed by this pointer.
uint64_t SizeInBits
Size.
uint32_t AlignInBits = 0
Alignment. (optional)
Optional<unsigned int> DWARFAddressSpace = None
DWARF address space. (optional)
llvm::StringRef Name = ""
Pointer type name. (optional)
llvm::DINodeArray Annotations = nullptr
Member annotations.

llvm::DIDerivedType* createQualifiedType(
    unsigned int Tag,
    llvm::DIType* FromTy)

Description

Create debugging information entry for a qualified type, e.g. 'const int'.

Declared at: llvm/include/llvm/IR/DIBuilder.h:245

Parameters

unsigned int Tag
Tag identifing type, e.g. dwarf::TAG_volatile_type
llvm::DIType* FromTy
Base Type.

llvm::DIDerivedType* createReferenceType(
    unsigned int Tag,
    llvm::DIType* RTy,
    uint64_t SizeInBits = 0,
    uint32_t AlignInBits = 0,
    Optional<unsigned int> DWARFAddressSpace =
        None)

Description

Create debugging information entry for a c++ style reference or rvalue reference type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:272

Parameters

unsigned int Tag
llvm::DIType* RTy
uint64_t SizeInBits = 0
uint32_t AlignInBits = 0
Optional<unsigned int> DWARFAddressSpace = None

llvm::DICompositeType*
createReplaceableCompositeType(
    unsigned int Tag,
    llvm::StringRef Name,
    llvm::DIScope* Scope,
    llvm::DIFile* F,
    unsigned int Line,
    unsigned int RuntimeLang = 0,
    uint64_t SizeInBits = 0,
    uint32_t AlignInBits = 0,
    DINode::DIFlags Flags = DINode::FlagFwdDecl,
    llvm::StringRef UniqueIdentifier = "",
    llvm::DINodeArray Annotations = nullptr)

Description

Create a temporary forward-declared type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:624

Parameters

unsigned int Tag
llvm::StringRef Name
llvm::DIScope* Scope
llvm::DIFile* F
unsigned int Line
unsigned int RuntimeLang = 0
uint64_t SizeInBits = 0
uint32_t AlignInBits = 0
DINode::DIFlags Flags = DINode::FlagFwdDecl
llvm::StringRef UniqueIdentifier = ""
llvm::DINodeArray Annotations = nullptr

llvm::DIDerivedType* createSetType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    llvm::DIType* Ty)

Description

Create debugging information entry for a set.

Declared at: llvm/include/llvm/IR/DIBuilder.h:590

Parameters

llvm::DIScope* Scope
Scope in which this set is defined.
llvm::StringRef Name
Set name.
llvm::DIFile* File
File where this set is defined.
unsigned int LineNo
Line number.
uint64_t SizeInBits
Set size.
uint32_t AlignInBits
Set alignment.
llvm::DIType* Ty
Base type of the set.

llvm::DIDerivedType* createStaticMemberType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIType* Ty,
    DINode::DIFlags Flags,
    llvm::Constant* Val,
    uint32_t AlignInBits = 0)

Description

Create debugging information entry for a C++ static data member.

Declared at: llvm/include/llvm/IR/DIBuilder.h:374

Parameters

llvm::DIScope* Scope
Member scope.
llvm::StringRef Name
Member name.
llvm::DIFile* File
File where this member is declared.
unsigned int LineNo
Line number.
llvm::DIType* Ty
Type of the static member.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private.
llvm::Constant* Val
Const initializer of the member.
uint32_t AlignInBits = 0
Member alignment.

llvm::DIStringType* createStringType(
    llvm::StringRef Name,
    llvm::DIExpression* StringLengthExp,
    llvm::DIExpression* StrLocationExp = nullptr)

Description

Create debugging information entry for Fortran assumed length string type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:237

Parameters

llvm::StringRef Name
Type name.
llvm::DIExpression* StringLengthExp
String length expressed in DIExpression form.
llvm::DIExpression* StrLocationExp = nullptr
Optional memory location of the string.

llvm::DIStringType* createStringType(
    llvm::StringRef Name,
    llvm::DIVariable* StringLength,
    llvm::DIExpression* StrLocationExp = nullptr)

Description

Create debugging information entry for Fortran assumed length string type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:229

Parameters

llvm::StringRef Name
Type name.
llvm::DIVariable* StringLength
String length expressed as DIVariable *.
llvm::DIExpression* StrLocationExp = nullptr
Optional memory location of the string.

llvm::DIStringType* createStringType(
    llvm::StringRef Name,
    uint64_t SizeInBits)

Description

Create debugging information entry for a string type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:222

Parameters

llvm::StringRef Name
Type name.
uint64_t SizeInBits
Size of the type.

llvm::DICompositeType* createStructType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    DINode::DIFlags Flags,
    llvm::DIType* DerivedFrom,
    llvm::DINodeArray Elements,
    unsigned int RunTimeLang = 0,
    llvm::DIType* VTableHolder = nullptr,
    llvm::StringRef UniqueIdentifier = "")

Description

Create debugging information entry for a struct.

Declared at: llvm/include/llvm/IR/DIBuilder.h:445

Parameters

llvm::DIScope* Scope
Scope in which this struct is defined.
llvm::StringRef Name
Struct name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNumber
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIType* DerivedFrom
llvm::DINodeArray Elements
Struct elements.
unsigned int RunTimeLang = 0
Optional parameter, Objective-C runtime version.
llvm::DIType* VTableHolder = nullptr
llvm::StringRef UniqueIdentifier = ""
A unique identifier for the struct.

llvm::DISubroutineType* createSubroutineType(
    llvm::DITypeRefArray ParameterTypes,
    DINode::DIFlags Flags = DINode::FlagZero,
    unsigned int CC = 0)

Description

Create subroutine type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:601

Parameters

llvm::DITypeRefArray ParameterTypes
An array of subroutine parameter types. This includes return type at 0th index.
DINode::DIFlags Flags = DINode::FlagZero
E.g.: LValueReference. These flags are used to emit dwarf attributes.
unsigned int CC = 0
Calling convention, e.g. dwarf::DW_CC_normal

llvm::DISubprogram* createTempFunctionFwdDecl(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::StringRef LinkageName,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DISubroutineType* Ty,
    unsigned int ScopeLine,
    DINode::DIFlags Flags = DINode::FlagZero,
    DISubprogram::DISPFlags SPFlags =
        DISubprogram::SPFlagZero,
    llvm::DITemplateParameterArray TParams =
        nullptr,
    llvm::DISubprogram* Decl = nullptr,
    llvm::DITypeArray ThrownTypes = nullptr)

Description

Identical to createFunction, except that the resulting DbgNode is meant to be RAUWed.

Declared at: llvm/include/llvm/IR/DIBuilder.h:770

Parameters

llvm::DIScope* Scope
llvm::StringRef Name
llvm::StringRef LinkageName
llvm::DIFile* File
unsigned int LineNo
llvm::DISubroutineType* Ty
unsigned int ScopeLine
DINode::DIFlags Flags = DINode::FlagZero
DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero
llvm::DITemplateParameterArray TParams = nullptr
llvm::DISubprogram* Decl = nullptr
llvm::DITypeArray ThrownTypes = nullptr

llvm::DIGlobalVariable*
createTempGlobalVariableFwdDecl(
    llvm::DIScope* Context,
    llvm::StringRef Name,
    llvm::StringRef LinkageName,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIType* Ty,
    bool IsLocalToUnit,
    llvm::MDNode* Decl = nullptr,
    llvm::MDTuple* TemplateParams = nullptr,
    uint32_t AlignInBits = 0)

Description

Identical to createGlobalVariable except that the resulting DbgNode is temporary and meant to be RAUWed.

Declared at: llvm/include/llvm/IR/DIBuilder.h:683

Parameters

llvm::DIScope* Context
llvm::StringRef Name
llvm::StringRef LinkageName
llvm::DIFile* File
unsigned int LineNo
llvm::DIType* Ty
bool IsLocalToUnit
llvm::MDNode* Decl = nullptr
llvm::MDTuple* TemplateParams = nullptr
uint32_t AlignInBits = 0

llvm::DIMacroFile* createTempMacroFile(
    llvm::DIMacroFile* Parent,
    unsigned int Line,
    llvm::DIFile* File)

Description

Create debugging information temporary entry for a macro file. List of macro node direct children will be calculated by DIBuilder, using the \p Parent relationship.

Declared at: llvm/include/llvm/IR/DIBuilder.h:194

Parameters

llvm::DIMacroFile* Parent
Macro file parent (could be nullptr).
unsigned int Line
Source line number where the macro file is included.
llvm::DIFile* File
File descriptor containing the name of the macro file.

llvm::DITemplateValueParameter*
createTemplateParameterPack(llvm::DIScope* Scope,
                            llvm::StringRef Name,
                            llvm::DIType* Ty,
                            llvm::DINodeArray Val)

Description

Create debugging information for a template parameter pack.

Declared at: llvm/include/llvm/IR/DIBuilder.h:528

Parameters

llvm::DIScope* Scope
Scope in which this type is defined.
llvm::StringRef Name
Value parameter name.
llvm::DIType* Ty
Parameter type.
llvm::DINodeArray Val
An array of types in the pack.

llvm::DITemplateValueParameter*
createTemplateTemplateParameter(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIType* Ty,
    llvm::StringRef Val)

Description

Create debugging information for a template template parameter.

Declared at: llvm/include/llvm/IR/DIBuilder.h:518

Parameters

llvm::DIScope* Scope
Scope in which this type is defined.
llvm::StringRef Name
Value parameter name.
llvm::DIType* Ty
Parameter type.
llvm::StringRef Val
The fully qualified name of the template.

llvm::DITemplateTypeParameter*
createTemplateTypeParameter(llvm::DIScope* Scope,
                            llvm::StringRef Name,
                            llvm::DIType* Ty,
                            bool IsDefault)

Description

Create debugging information for template type parameter.

Declared at: llvm/include/llvm/IR/DIBuilder.h:497

Parameters

llvm::DIScope* Scope
Scope in which this type is defined.
llvm::StringRef Name
Type parameter name.
llvm::DIType* Ty
Parameter type.
bool IsDefault
Parameter is default or not

llvm::DITemplateValueParameter*
createTemplateValueParameter(llvm::DIScope* Scope,
                             llvm::StringRef Name,
                             llvm::DIType* Ty,
                             bool IsDefault,
                             llvm::Constant* Val)

Description

Create debugging information for template value parameter.

Declared at: llvm/include/llvm/IR/DIBuilder.h:510

Parameters

llvm::DIScope* Scope
Scope in which this type is defined.
llvm::StringRef Name
Value parameter name.
llvm::DIType* Ty
Parameter type.
bool IsDefault
Parameter is default or not
llvm::Constant* Val
Constant parameter value.

llvm::DIDerivedType* createTypedef(
    llvm::DIType* Ty,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    llvm::DIScope* Context,
    uint32_t AlignInBits = 0,
    llvm::DINodeArray Annotations = nullptr)

Description

Create debugging information entry for a typedef.

Declared at: llvm/include/llvm/IR/DIBuilder.h:286

Parameters

llvm::DIType* Ty
Original type.
llvm::StringRef Name
Typedef name.
llvm::DIFile* File
File where this type is defined.
unsigned int LineNo
Line number.
llvm::DIScope* Context
The surrounding context for the typedef.
uint32_t AlignInBits = 0
Alignment. (optional)
llvm::DINodeArray Annotations = nullptr
Annotations. (optional)

llvm::DICompositeType* createUnionType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    DINode::DIFlags Flags,
    llvm::DINodeArray Elements,
    unsigned int RunTimeLang = 0,
    llvm::StringRef UniqueIdentifier = "")

Description

Create debugging information entry for an union.

Declared at: llvm/include/llvm/IR/DIBuilder.h:462

Parameters

llvm::DIScope* Scope
Scope in which this union is defined.
llvm::StringRef Name
Union name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNumber
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DINodeArray Elements
Union elements.
unsigned int RunTimeLang = 0
Optional parameter, Objective-C runtime version.
llvm::StringRef UniqueIdentifier = ""
A unique identifier for the union.

llvm::DIBasicType* createUnspecifiedParameter()

Description

Create unspecified parameter type for a subroutine type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:636

llvm::DIBasicType* createUnspecifiedType(
    llvm::StringRef Name)

Description

Create a DWARF unspecified type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:203

Parameters

llvm::StringRef Name

llvm::DIDerivedType* createVariantMemberType(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNo,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    uint64_t OffsetInBits,
    llvm::Constant* Discriminant,
    DINode::DIFlags Flags,
    llvm::DIType* Ty)

Description

Create debugging information entry for a variant. A variant normally should be a member of a variant part.

Declared at: llvm/include/llvm/IR/DIBuilder.h:337

Parameters

llvm::DIScope* Scope
Member scope.
llvm::StringRef Name
Member name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNo
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
uint64_t OffsetInBits
Member offset.
llvm::Constant* Discriminant
The discriminant for this branch; null for the default branch
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIType* Ty
Parent type.

llvm::DICompositeType* createVariantPart(
    llvm::DIScope* Scope,
    llvm::StringRef Name,
    llvm::DIFile* File,
    unsigned int LineNumber,
    uint64_t SizeInBits,
    uint32_t AlignInBits,
    DINode::DIFlags Flags,
    llvm::DIDerivedType* Discriminator,
    llvm::DINodeArray Elements,
    llvm::StringRef UniqueIdentifier = "")

Description

Create debugging information entry for a variant part. A variant part normally has a discriminator (though this is not required) and a number of variant children.

Declared at: llvm/include/llvm/IR/DIBuilder.h:483

Parameters

llvm::DIScope* Scope
Scope in which this union is defined.
llvm::StringRef Name
Union name.
llvm::DIFile* File
File where this member is defined.
unsigned int LineNumber
Line number.
uint64_t SizeInBits
Member size.
uint32_t AlignInBits
Member alignment.
DINode::DIFlags Flags
Flags to encode member attribute, e.g. private
llvm::DIDerivedType* Discriminator
Discriminant member
llvm::DINodeArray Elements
Variant elements.
llvm::StringRef UniqueIdentifier = ""
A unique identifier for the union.

llvm::DICompositeType* createVectorType(
    uint64_t Size,
    uint32_t AlignInBits,
    llvm::DIType* Ty,
    llvm::DINodeArray Subscripts)

Description

Create debugging information entry for a vector type.

Declared at: llvm/include/llvm/IR/DIBuilder.h:562

Parameters

uint64_t Size
Array size.
uint32_t AlignInBits
Alignment.
llvm::DIType* Ty
Element type.
llvm::DINodeArray Subscripts
Subscripts.

void finalize()

Description

Construct any deferred debug info descriptors.

Declared at: llvm/include/llvm/IR/DIBuilder.h:122

void finalizeSubprogram(llvm::DISubprogram* SP)

Description

Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.

Declared at: llvm/include/llvm/IR/DIBuilder.h:126

Parameters

llvm::DISubprogram* SP

llvm::DINodeArray getOrCreateArray(
    ArrayRef<llvm::Metadata*> Elements)

Description

Get a DINodeArray, create one if required.

Declared at: llvm/include/llvm/IR/DIBuilder.h:639

Parameters

ArrayRef<llvm::Metadata*> Elements

llvm::DIGenericSubrange*
getOrCreateGenericSubrange(
    DIGenericSubrange::BoundType Count,
    DIGenericSubrange::BoundType LowerBound,
    DIGenericSubrange::BoundType UpperBound,
    DIGenericSubrange::BoundType Stride)

Declared at: llvm/include/llvm/IR/DIBuilder.h:655

Parameters

DIGenericSubrange::BoundType Count
DIGenericSubrange::BoundType LowerBound
DIGenericSubrange::BoundType UpperBound
DIGenericSubrange::BoundType Stride

llvm::DIMacroNodeArray getOrCreateMacroArray(
    ArrayRef<llvm::Metadata*> Elements)

Description

Get a DIMacroNodeArray, create one if required.

Declared at: llvm/include/llvm/IR/DIBuilder.h:642

Parameters

ArrayRef<llvm::Metadata*> Elements

llvm::DISubrange* getOrCreateSubrange(
    llvm::Metadata* Count,
    llvm::Metadata* LowerBound,
    llvm::Metadata* UpperBound,
    llvm::Metadata* Stride)

Declared at: llvm/include/llvm/IR/DIBuilder.h:651

Parameters

llvm::Metadata* Count
llvm::Metadata* LowerBound
llvm::Metadata* UpperBound
llvm::Metadata* Stride

llvm::DISubrange* getOrCreateSubrange(
    int64_t Lo,
    llvm::Metadata* CountNode)

Declared at: llvm/include/llvm/IR/DIBuilder.h:650

Parameters

int64_t Lo
llvm::Metadata* CountNode

llvm::DISubrange* getOrCreateSubrange(
    int64_t Lo,
    int64_t Count)

Description

Create a descriptor for a value range. This implicitly uniques the values returned.

Declared at: llvm/include/llvm/IR/DIBuilder.h:649

Parameters

int64_t Lo
int64_t Count

llvm::DITypeRefArray getOrCreateTypeArray(
    ArrayRef<llvm::Metadata*> Elements)

Description

Get a DITypeRefArray, create one if required.

Declared at: llvm/include/llvm/IR/DIBuilder.h:645

Parameters

ArrayRef<llvm::Metadata*> Elements

llvm::Instruction* insertDbgAddrIntrinsic(
    llvm::Value* Addr,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::Instruction* InsertBefore)

Description

Insert a new llvm.dbg.addr intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:984

Parameters

llvm::Value* Addr
llvm::Value of the address.
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::Instruction* InsertBefore
Location for the new intrinsic.

llvm::Instruction* insertDbgAddrIntrinsic(
    llvm::Value* Val,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertBB,
    llvm::Instruction* InsertBefore)

Description

Internal helper for insertDbgAddrIntrinsic.

Declared at: llvm/include/llvm/IR/DIBuilder.h:105

Parameters

llvm::Value* Val
llvm::DILocalVariable* VarInfo
llvm::DIExpression* Expr
const llvm::DILocation* DL
llvm::BasicBlock* InsertBB
llvm::Instruction* InsertBefore

llvm::Instruction* insertDbgAddrIntrinsic(
    llvm::Value* Addr,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertAtEnd)

Description

Insert a new llvm.dbg.addr intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:972

Parameters

llvm::Value* Addr
llvm::Value of the address
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::BasicBlock* InsertAtEnd
Location for the new intrinsic.

llvm::Instruction* insertDbgIntrinsic(
    llvm::Function* Intrinsic,
    llvm::Value* Val,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertBB,
    llvm::Instruction* InsertBefore)

Description

Internal helper with common code used by insertDbg{Value,Addr}Intrinsic.

Declared at: llvm/include/llvm/IR/DIBuilder.h:91

Parameters

llvm::Function* Intrinsic
llvm::Value* Val
llvm::DILocalVariable* VarInfo
llvm::DIExpression* Expr
const llvm::DILocation* DL
llvm::BasicBlock* InsertBB
llvm::Instruction* InsertBefore

llvm::Instruction* insertDbgValueIntrinsic(
    llvm::Value* Val,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::Instruction* InsertBefore)

Description

Insert a new llvm.dbg.value intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:960

Parameters

llvm::Value* Val
llvm::Value of the variable
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::Instruction* InsertBefore
Location for the new intrinsic.

llvm::Instruction* insertDbgValueIntrinsic(
    llvm::Value* Val,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertBB,
    llvm::Instruction* InsertBefore)

Description

Internal helper for insertDbgValueIntrinsic.

Declared at: llvm/include/llvm/IR/DIBuilder.h:99

Parameters

llvm::Value* Val
llvm::DILocalVariable* VarInfo
llvm::DIExpression* Expr
const llvm::DILocation* DL
llvm::BasicBlock* InsertBB
llvm::Instruction* InsertBefore

llvm::Instruction* insertDbgValueIntrinsic(
    llvm::Value* Val,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertAtEnd)

Description

Insert a new llvm.dbg.value intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:948

Parameters

llvm::Value* Val
llvm::Value of the variable
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::BasicBlock* InsertAtEnd
Location for the new intrinsic.

llvm::Instruction* insertDeclare(
    llvm::Value* Storage,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertBB,
    llvm::Instruction* InsertBefore)

Description

Internal helper for insertDeclare.

Declared at: llvm/include/llvm/IR/DIBuilder.h:82

Parameters

llvm::Value* Storage
llvm::DILocalVariable* VarInfo
llvm::DIExpression* Expr
const llvm::DILocation* DL
llvm::BasicBlock* InsertBB
llvm::Instruction* InsertBefore

llvm::Instruction* insertDeclare(
    llvm::Value* Storage,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::Instruction* InsertBefore)

Description

Insert a new llvm.dbg.declare intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:924

Parameters

llvm::Value* Storage
llvm::Value of the variable
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::Instruction* InsertBefore
Location for the new intrinsic.

llvm::Instruction* insertDeclare(
    llvm::Value* Storage,
    llvm::DILocalVariable* VarInfo,
    llvm::DIExpression* Expr,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertAtEnd)

Description

Insert a new llvm.dbg.declare intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:914

Parameters

llvm::Value* Storage
llvm::Value of the variable
llvm::DILocalVariable* VarInfo
Variable's debug info descriptor.
llvm::DIExpression* Expr
A complex location expression.
const llvm::DILocation* DL
Debug info location.
llvm::BasicBlock* InsertAtEnd
Location for the new intrinsic.

llvm::Instruction* insertLabel(
    llvm::DILabel* LabelInfo,
    const llvm::DILocation* DL,
    llvm::Instruction* InsertBefore)

Description

Insert a new llvm.dbg.label intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:932

Parameters

llvm::DILabel* LabelInfo
Label's debug info descriptor.
const llvm::DILocation* DL
Debug info location.
llvm::Instruction* InsertBefore
Location for the new intrinsic.

llvm::Instruction* insertLabel(
    llvm::DILabel* LabelInfo,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertAtEnd)

Description

Insert a new llvm.dbg.label intrinsic call.

Declared at: llvm/include/llvm/IR/DIBuilder.h:939

Parameters

llvm::DILabel* LabelInfo
Label's debug info descriptor.
const llvm::DILocation* DL
Debug info location.
llvm::BasicBlock* InsertAtEnd
Location for the new intrinsic.

llvm::Instruction* insertLabel(
    llvm::DILabel* LabelInfo,
    const llvm::DILocation* DL,
    llvm::BasicBlock* InsertBB,
    llvm::Instruction* InsertBefore)

Description

Internal helper for insertLabel.

Declared at: llvm/include/llvm/IR/DIBuilder.h:87

Parameters

llvm::DILabel* LabelInfo
const llvm::DILocation* DL
llvm::BasicBlock* InsertBB
llvm::Instruction* InsertBefore

void replaceArrays(
    llvm::DICompositeType*& T,
    llvm::DINodeArray Elements,
    llvm::DINodeArray TParams = llvm::
        MDTupleTypedArrayWrapper<llvm::DINode>())

Description

Replace arrays on a composite type. If \c T is resolved, but the arrays aren't -- which can happen if \c T has a self-reference -- \a DIBuilder needs to track the array to resolve cycles.

Declared at: llvm/include/llvm/IR/DIBuilder.h:1002

Parameters

llvm::DICompositeType*& T
llvm::DINodeArray Elements
llvm::DINodeArray TParams = llvm::MDTupleTypedArrayWrapper<llvm::DINode>()

template <class NodeTy>
NodeTy* replaceTemporary(llvm::TempMDNode&& N,
                         NodeTy* Replacement)

Description

Replace a temporary node. Call \a MDNode::replaceAllUsesWith() on \c N, replacing it with \c Replacement. If \c Replacement is the same as \c N.get(), instead call \a MDNode::replaceWithUniqued(). In this case, the uniqued node could have a different address, so we return the final address.

Declared at: llvm/include/llvm/IR/DIBuilder.h:1014

Templates

NodeTy

Parameters

llvm::TempMDNode&& N
NodeTy* Replacement

void replaceVTableHolder(
    llvm::DICompositeType*& T,
    llvm::DIType* VTableHolder)

Description

Replace the vtable holder in the given type. If this creates a self reference, it may orphan some unresolved cycles in the operands of \c T, so \a DIBuilder needs to track that.

Declared at: llvm/include/llvm/IR/DIBuilder.h:994

Parameters

llvm::DICompositeType*& T
llvm::DIType* VTableHolder

void retainType(llvm::DIScope* T)

Description

Retain DIScope* in a module even if it is not referenced through debug info anchors.

Declared at: llvm/include/llvm/IR/DIBuilder.h:632

Parameters

llvm::DIScope* T

void trackIfUnresolved(llvm::MDNode* N)

Description

Create a temporary. Create an \a temporary node and track it in \a UnresolvedNodes.

Declared at: llvm/include/llvm/IR/DIBuilder.h:79

Parameters

llvm::MDNode* N