14#ifndef LLVM_IR_DIBUILDER_H
15#define LLVM_IR_DIBUILDER_H
40 class DbgAssignIntrinsic;
68 bool AllowUnresolvedNodes;
77 SubprogramTrackedNodes;
80 getImportTrackingVector(
const DIScope *S) {
81 return isa_and_nonnull<DILocalScope>(S)
82 ? getSubprogramNodesTrackingVector(S)
86 getSubprogramNodesTrackingVector(
const DIScope *S) {
87 return SubprogramTrackedNodes[cast<DILocalScope>(S)->getSubprogram()];
93 void trackIfUnresolved(
MDNode *
N);
107 bool InsertAtHead =
false);
171 bool isOptimized,
StringRef Flags,
unsigned RV,
175 uint64_t DWOId = 0,
bool SplitDebugInlining =
true,
176 bool DebugInfoForProfiling =
false,
179 bool RangesBaseAddress =
false,
StringRef SysRoot = {},
189 StringRef Filename, StringRef Directory,
190 std::optional<DIFile::ChecksumInfo<StringRef>> Checksum = std::nullopt,
191 std::optional<StringRef> Source = std::nullopt);
199 DIMacro *
createMacro(DIMacroFile *Parent,
unsigned Line,
unsigned MacroType,
200 StringRef
Name, StringRef Value = StringRef());
214 bool IsUnsigned =
false);
248 DIExpression *StrLocationExp =
nullptr);
256 DIExpression *StringLengthExp,
257 DIExpression *StrLocationExp =
nullptr);
275 std::optional<unsigned> DWARFAddressSpace = std::nullopt,
276 StringRef
Name =
"", DINodeArray Annotations =
nullptr);
280 bool IsAddressDiscriminated,
281 unsigned ExtraDiscriminator,
283 bool authenticatesNullValues);
298 unsigned Tag, DIType *RTy,
uint64_t SizeInBits = 0,
300 std::optional<unsigned> DWARFAddressSpace = std::nullopt);
312 unsigned LineNo, DIScope *Context,
315 DINodeArray Annotations =
nullptr);
329 unsigned LineNo, DIScope *Context,
333 DINodeArray Annotations =
nullptr);
336 DIDerivedType *
createFriend(DIType *Ty, DIType *FriendTy);
362 DIFile *File,
unsigned LineNo,
366 DINodeArray Annotations =
nullptr);
382 DIFile *File,
unsigned LineNo,
386 Constant *Discriminant,
401 DIFile *File,
unsigned LineNo,
406 DINodeArray Annotations =
nullptr);
420 DIFile *File,
unsigned LineNo,
422 Constant *Val,
unsigned Tag,
439 DIType *Ty, MDNode *PropertyNode);
452 StringRef GetterName,
453 StringRef SetterName,
454 unsigned PropertyAttributes, DIType *Ty);
474 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
477 unsigned RunTimeLang = 0, DIType *VTableHolder =
nullptr,
478 MDNode *TemplateParms =
nullptr, StringRef UniqueIdentifier =
"");
497 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
499 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
500 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"",
501 DIType *Specification =
nullptr,
uint32_t NumExtraInhabitants = 0);
515 DIFile *File,
unsigned LineNumber,
518 DINodeArray Elements,
519 unsigned RunTimeLang = 0,
520 StringRef UniqueIdentifier =
"");
536 DIFile *File,
unsigned LineNumber,
539 DIDerivedType *Discriminator,
540 DINodeArray Elements,
541 StringRef UniqueIdentifier =
"");
561 DITemplateValueParameter *
563 bool IsDefault, Constant *Val);
571 DITemplateValueParameter *
573 StringRef Val,
bool IsDefault =
false);
604 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
605 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
606 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
607 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr);
615 DIType *Ty, DINodeArray Subscripts);
632 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
634 DIType *UnderlyingType,
unsigned RunTimeLang = 0,
635 StringRef UniqueIdentifier =
"",
bool IsScoped =
false);
645 unsigned LineNo,
uint64_t SizeInBits,
671 DIScope *Scope, DIFile *
F,
unsigned Line,
672 unsigned RuntimeLang = 0,
675 StringRef UniqueIdentifier =
"");
679 unsigned Tag, StringRef
Name, DIScope *Scope, DIFile *
F,
unsigned Line,
680 unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
682 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr);
706 Metadata *UpperBound, Metadata *Stride);
730 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit,
bool isDefined =
true,
731 DIExpression *Expr =
nullptr, MDNode *Decl =
nullptr,
732 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0,
733 DINodeArray Annotations =
nullptr);
739 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit, MDNode *Decl =
nullptr,
740 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0);
752 unsigned LineNo, DIType *Ty,
bool AlwaysPreserve =
false,
761 createLabel(DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNo,
762 bool AlwaysPreserve =
false);
777 DIFile *File,
unsigned LineNo, DIType *Ty,
778 bool AlwaysPreserve =
false,
780 DINodeArray Annotations =
nullptr);
791 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
816 DITemplateParameterArray TParams =
nullptr,
818 DITypeArray ThrownTypes =
nullptr,
829 DITemplateParameterArray TParams =
nullptr,
830 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr);
854 unsigned VTableIndex = 0,
int ThisAdjustment = 0,
855 DIType *VTableHolder =
nullptr,
858 DITemplateParameterArray TParams =
nullptr,
859 DITypeArray ThrownTypes =
nullptr);
898 StringRef APINotesFile = {}, DIFile *File =
nullptr,
899 unsigned LineNo = 0,
bool IsDecl =
false);
908 unsigned Discriminator = 0);
917 unsigned Line,
unsigned Col);
926 DIFile *File,
unsigned Line,
927 DINodeArray Elements =
nullptr);
936 DIImportedEntity *NS, DIFile *File,
938 DINodeArray Elements =
nullptr);
947 DIFile *File,
unsigned Line,
948 DINodeArray Elements =
nullptr);
958 DIFile *File,
unsigned Line,
960 DINodeArray Elements =
nullptr);
969 DIExpression *Expr,
const DILocation *
DL,
970 BasicBlock *InsertAtEnd);
987 DILocalVariable *SrcVar, DIExpression *ValExpr,
988 Value *
Addr, DIExpression *AddrExpr,
989 const DILocation *
DL);
998 DIExpression *Expr,
const DILocation *
DL,
999 Instruction *InsertBefore);
1005 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
1006 Instruction *InsertBefore);
1012 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
1013 BasicBlock *InsertAtEnd);
1022 DILocalVariable *VarInfo,
1023 DIExpression *Expr,
const DILocation *
DL,
1024 BasicBlock *InsertAtEnd);
1033 DILocalVariable *VarInfo,
1034 DIExpression *Expr,
const DILocation *
DL,
1035 Instruction *InsertBefore);
1042 DIType *VTableHolder);
1050 DINodeArray TParams = DINodeArray());
1060 template <
class NodeTy>
1062 if (
N.get() == Replacement)
1065 N->replaceAllUsesWith(Replacement);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
This file defines the DenseMap class.
This file contains constants used for implementing Dwarf debug support.
Machine Check Debug Module
This file implements a map that provides insertion order iteration.
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallVector class.
Annotations lets you mark points and ranges inside source code, for tests:
LLVM Basic Block Representation.
DIBasicType * createUnspecifiedParameter()
Create unspecified parameter type for a subroutine type.
DIGlobalVariable * createTempGlobalVariableFwdDecl(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl=nullptr, MDTuple *TemplateParams=nullptr, uint32_t AlignInBits=0)
Identical to createGlobalVariable except that the resulting DbgNode is temporary and meant to be RAUW...
DITemplateValueParameter * createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val, bool IsDefault=false)
Create debugging information for a template template parameter.
DIDerivedType * createBitFieldMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a bit field member.
NodeTy * replaceTemporary(TempMDNode &&N, NodeTy *Replacement)
Replace a temporary node.
DIDerivedType * createTypedef(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create debugging information entry for a typedef.
DIBuilder & operator=(const DIBuilder &)=delete
void finalize()
Construct any deferred debug info descriptors.
DISubroutineType * createSubroutineType(DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
DIMacro * createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef())
Create debugging information entry for a macro.
DIDerivedType * createInheritance(DIType *Ty, DIType *BaseTy, uint64_t BaseOffset, uint32_t VBPtrOffset, DINode::DIFlags Flags)
Create debugging information entry to establish inheritance relationship between two types.
DIDerivedType * createStaticMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, DINode::DIFlags Flags, Constant *Val, unsigned Tag, uint32_t AlignInBits=0)
Create debugging information entry for a C++ static data member.
DIDerivedType * createVariantMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Constant *Discriminant, DINode::DIFlags Flags, DIType *Ty)
Create debugging information entry for a variant.
DICompositeType * createClassType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, MDNode *TemplateParms=nullptr, StringRef UniqueIdentifier="")
Create debugging information entry for a class.
DICompositeType * createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements, DIType *UnderlyingType, unsigned RunTimeLang=0, StringRef UniqueIdentifier="", bool IsScoped=false)
Create debugging information entry for an enumeration.
DILexicalBlockFile * createLexicalBlockFile(DIScope *Scope, DIFile *File, unsigned Discriminator=0)
This creates a descriptor for a lexical block with a new file attached.
void finalizeSubprogram(DISubprogram *SP)
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.
DIDerivedType * createQualifiedType(unsigned Tag, DIType *FromTy)
Create debugging information entry for a qualified type, e.g.
DICompileUnit * createCompileUnit(unsigned Lang, DIFile *File, StringRef Producer, bool isOptimized, StringRef Flags, unsigned RV, StringRef SplitName=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, StringRef SysRoot={}, StringRef SDK={})
A CompileUnit provides an anchor for all debugging information generated during this instance of comp...
DISubprogram * createTempFunctionFwdDecl(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, DITemplateParameterArray TParams=nullptr, DISubprogram *Decl=nullptr, DITypeArray ThrownTypes=nullptr)
Identical to createFunction, except that the resulting DbgNode is meant to be RAUWed.
DIDerivedType * createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *Ty, MDNode *PropertyNode)
Create debugging information entry for Objective-C instance variable.
static DIType * createArtificialType(DIType *Ty)
Create a uniqued clone of Ty with FlagArtificial set.
DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts)
Create debugging information entry for a vector type.
static DIType * createObjectPointerType(DIType *Ty)
Create a uniqued clone of Ty with FlagObjectPointer and FlagArtificial set.
DILabel * createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, bool AlwaysPreserve=false)
Create a new descriptor for an label.
DINamespace * createNameSpace(DIScope *Scope, StringRef Name, bool ExportSymbols)
This creates new descriptor for a namespace with the specified parent scope.
DIStringType * createStringType(StringRef Name, uint64_t SizeInBits)
Create debugging information entry for a string type.
DISubprogram * createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, DITemplateParameterArray TParams=nullptr, DISubprogram *Decl=nullptr, DITypeArray ThrownTypes=nullptr, DINodeArray Annotations=nullptr, StringRef TargetFuncName="")
Create a new descriptor for the specified subprogram.
DbgInstPtr insertDbgAssign(Instruction *LinkedInstr, Value *Val, DILocalVariable *SrcVar, DIExpression *ValExpr, Value *Addr, DIExpression *AddrExpr, const DILocation *DL)
Insert a new llvm.dbg.assign intrinsic call.
DILexicalBlock * createLexicalBlock(DIScope *Scope, DIFile *File, unsigned Line, unsigned Col)
This creates a descriptor for a lexical block with the specified parent context.
DICompositeType * createUnionType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DINodeArray Elements, unsigned RunTimeLang=0, StringRef UniqueIdentifier="")
Create debugging information entry for an union.
DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata * > Elements)
Get a DIMacroNodeArray, create one if required.
DIDerivedType * createSetType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, DIType *Ty)
Create debugging information entry for a set.
void replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder)
Replace the vtable holder in the given type.
DIExpression * createConstantValueExpression(uint64_t Val)
Create an expression for a variable that does not have an address, but does have a constant value.
DIBasicType * createNullPtrType()
Create C++11 nullptr type.
DICommonBlock * createCommonBlock(DIScope *Scope, DIGlobalVariable *decl, StringRef Name, DIFile *File, unsigned LineNo)
Create common block entry for a Fortran common block.
DIDerivedType * createFriend(DIType *Ty, DIType *FriendTy)
Create debugging information entry for a 'friend'.
void retainType(DIScope *T)
Retain DIScope* in a module even if it is not referenced through debug info anchors.
DIDerivedType * createTemplateAlias(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, DINodeArray TParams, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create debugging information entry for a template alias.
DIBuilder(const DIBuilder &)=delete
DIDerivedType * createPointerType(DIType *PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits=0, std::optional< unsigned > DWARFAddressSpace=std::nullopt, StringRef Name="", DINodeArray Annotations=nullptr)
Create debugging information entry for a pointer.
DITemplateValueParameter * createTemplateParameterPack(DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val)
Create debugging information for a template parameter pack.
DIGlobalVariableExpression * createGlobalVariableExpression(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined=true, DIExpression *Expr=nullptr, MDNode *Decl=nullptr, MDTuple *TemplateParams=nullptr, uint32_t AlignInBits=0, DINodeArray Annotations=nullptr)
Create a new descriptor for the specified variable.
DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero, uint32_t NumExtraInhabitants=0)
Create debugging information entry for a basic type.
DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
Create a descriptor for a value range.
DIDerivedType * createReferenceType(unsigned Tag, DIType *RTy, uint64_t SizeInBits=0, uint32_t AlignInBits=0, std::optional< unsigned > DWARFAddressSpace=std::nullopt)
Create debugging information entry for a c++ style reference or rvalue reference type.
DISubprogram * createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned VTableIndex=0, int ThisAdjustment=0, DIType *VTableHolder=nullptr, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, DITemplateParameterArray TParams=nullptr, DITypeArray ThrownTypes=nullptr)
Create a new descriptor for the specified C++ method.
DIMacroFile * createTempMacroFile(DIMacroFile *Parent, unsigned Line, DIFile *File)
Create debugging information temporary entry for a macro file.
DICompositeType * createArrayType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts, PointerUnion< DIExpression *, DIVariable * > DataLocation=nullptr, PointerUnion< DIExpression *, DIVariable * > Associated=nullptr, PointerUnion< DIExpression *, DIVariable * > Allocated=nullptr, PointerUnion< DIExpression *, DIVariable * > Rank=nullptr)
Create debugging information entry for an array.
DIDerivedType * createMemberPointerType(DIType *PointeeTy, DIType *Class, uint64_t SizeInBits, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero)
Create debugging information entry for a pointer to member.
DITypeRefArray getOrCreateTypeArray(ArrayRef< Metadata * > Elements)
Get a DITypeRefArray, create one if required.
DINodeArray getOrCreateArray(ArrayRef< Metadata * > Elements)
Get a DINodeArray, create one if required.
DIEnumerator * createEnumerator(StringRef Name, const APSInt &Value)
Create a single enumerator value.
DITemplateTypeParameter * createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault)
Create debugging information for template type parameter.
DIExpression * createExpression(ArrayRef< uint64_t > Addr={})
Create a new descriptor for the specified variable which has a complex address expression for its add...
DICompositeType * createReplaceableCompositeType(unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagFwdDecl, StringRef UniqueIdentifier="", DINodeArray Annotations=nullptr)
Create a temporary forward-declared type.
DIDerivedType * createPtrAuthQualifiedType(DIType *FromTy, unsigned Key, bool IsAddressDiscriminated, unsigned ExtraDiscriminator, bool IsaPointer, bool authenticatesNullValues)
Create a __ptrauth qualifier.
DICompositeType * createVariantPart(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIDerivedType *Discriminator, DINodeArray Elements, StringRef UniqueIdentifier="")
Create debugging information entry for a variant part.
DIImportedEntity * createImportedModule(DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr)
Create a descriptor for an imported module.
DIDerivedType * createMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a member.
DIImportedEntity * createImportedDeclaration(DIScope *Context, DINode *Decl, DIFile *File, unsigned Line, StringRef Name="", DINodeArray Elements=nullptr)
Create a descriptor for an imported function.
DILocalVariable * createAutoVariable(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve=false, DINode::DIFlags Flags=DINode::FlagZero, uint32_t AlignInBits=0)
Create a new descriptor for an auto variable.
static DISubprogram * createArtificialSubprogram(DISubprogram *SP)
Create a distinct clone of SP with FlagArtificial set.
DIGenericSubrange * getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride)
DIBasicType * createUnspecifiedType(StringRef Name)
Create a DWARF unspecified type.
DIObjCProperty * createObjCProperty(StringRef Name, DIFile *File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, unsigned PropertyAttributes, DIType *Ty)
Create debugging information entry for Objective-C property.
DICompositeType * createForwardDecl(unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint32_t AlignInBits=0, StringRef UniqueIdentifier="")
Create a permanent forward-declared type.
DITemplateValueParameter * createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault, Constant *Val)
Create debugging information for template value parameter.
DILocalVariable * createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve=false, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create a new descriptor for a parameter variable.
DIFile * createFile(StringRef Filename, StringRef Directory, std::optional< DIFile::ChecksumInfo< StringRef > > Checksum=std::nullopt, std::optional< StringRef > Source=std::nullopt)
Create a file descriptor to hold debugging information for a file.
DICompositeType * createStructType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, StringRef UniqueIdentifier="", DIType *Specification=nullptr, uint32_t NumExtraInhabitants=0)
Create debugging information entry for a struct.
void replaceArrays(DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray())
Replace arrays on a composite type.
DIModule * createModule(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile={}, DIFile *File=nullptr, unsigned LineNo=0, bool IsDecl=false)
This creates new descriptor for a module with the specified parent scope.
PointerUnion< DIVariable *, DIExpression * > BoundType
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Base class for scope-like contexts.
DISPFlags
Debug info subprogram flags.
Type array for a subprogram.
Record of a variable value-assignment, aka a non instruction representation of the dbg....
This is an important class for using LLVM in a threaded context.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
static std::enable_if_t< std::is_base_of< MDNode, T >::value, T * > replaceWithUniqued(std::unique_ptr< T, TempMDNodeDeleter > N)
Replace a temporary node with a uniqued one.
This class implements a map that also provides access to all stored values in a deterministic order.
A Module instance is used to store all the information related to an LLVM module.
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
PointerUnion< Instruction *, DbgRecord * > DbgInstPtr