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);
244 DIExpression *StrLocationExp =
nullptr);
252 DIExpression *StringLengthExp,
253 DIExpression *StrLocationExp =
nullptr);
271 std::optional<unsigned> DWARFAddressSpace = std::nullopt,
272 StringRef
Name =
"", DINodeArray Annotations =
nullptr);
276 bool IsAddressDiscriminated,
277 unsigned ExtraDiscriminator,
279 bool authenticatesNullValues);
294 unsigned Tag, DIType *RTy,
uint64_t SizeInBits = 0,
296 std::optional<unsigned> DWARFAddressSpace = std::nullopt);
308 unsigned LineNo, DIScope *Context,
311 DINodeArray Annotations =
nullptr);
314 DIDerivedType *
createFriend(DIType *Ty, DIType *FriendTy);
340 DIFile *File,
unsigned LineNo,
344 DINodeArray Annotations =
nullptr);
360 DIFile *File,
unsigned LineNo,
364 Constant *Discriminant,
379 DIFile *File,
unsigned LineNo,
384 DINodeArray Annotations =
nullptr);
398 DIFile *File,
unsigned LineNo,
400 Constant *Val,
unsigned Tag,
417 DIType *Ty, MDNode *PropertyNode);
430 StringRef GetterName,
431 StringRef SetterName,
432 unsigned PropertyAttributes, DIType *Ty);
452 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
455 unsigned RunTimeLang = 0, DIType *VTableHolder =
nullptr,
456 MDNode *TemplateParms =
nullptr, StringRef UniqueIdentifier =
"");
470 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
472 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
473 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"");
487 DIFile *File,
unsigned LineNumber,
490 DINodeArray Elements,
491 unsigned RunTimeLang = 0,
492 StringRef UniqueIdentifier =
"");
508 DIFile *File,
unsigned LineNumber,
511 DIDerivedType *Discriminator,
512 DINodeArray Elements,
513 StringRef UniqueIdentifier =
"");
533 DITemplateValueParameter *
535 bool IsDefault, Constant *Val);
543 DITemplateValueParameter *
545 StringRef Val,
bool IsDefault =
false);
576 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
577 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
578 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
579 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr);
587 DIType *Ty, DINodeArray Subscripts);
604 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
606 DIType *UnderlyingType,
unsigned RunTimeLang = 0,
607 StringRef UniqueIdentifier =
"",
bool IsScoped =
false);
617 unsigned LineNo,
uint64_t SizeInBits,
643 DIScope *Scope, DIFile *
F,
unsigned Line,
644 unsigned RuntimeLang = 0,
647 StringRef UniqueIdentifier =
"");
651 unsigned Tag, StringRef
Name, DIScope *Scope, DIFile *
F,
unsigned Line,
652 unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
654 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr);
678 Metadata *UpperBound, Metadata *Stride);
702 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit,
bool isDefined =
true,
703 DIExpression *Expr =
nullptr, MDNode *Decl =
nullptr,
704 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0,
705 DINodeArray Annotations =
nullptr);
711 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit, MDNode *Decl =
nullptr,
712 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0);
724 unsigned LineNo, DIType *Ty,
bool AlwaysPreserve =
false,
733 createLabel(DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNo,
734 bool AlwaysPreserve =
false);
749 DIFile *File,
unsigned LineNo, DIType *Ty,
750 bool AlwaysPreserve =
false,
752 DINodeArray Annotations =
nullptr);
763 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
788 DITemplateParameterArray TParams =
nullptr,
790 DITypeArray ThrownTypes =
nullptr,
801 DITemplateParameterArray TParams =
nullptr,
802 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr);
826 unsigned VTableIndex = 0,
int ThisAdjustment = 0,
827 DIType *VTableHolder =
nullptr,
830 DITemplateParameterArray TParams =
nullptr,
831 DITypeArray ThrownTypes =
nullptr);
870 StringRef APINotesFile = {}, DIFile *File =
nullptr,
871 unsigned LineNo = 0,
bool IsDecl =
false);
880 unsigned Discriminator = 0);
889 unsigned Line,
unsigned Col);
898 DIFile *File,
unsigned Line,
899 DINodeArray Elements =
nullptr);
908 DIImportedEntity *NS, DIFile *File,
910 DINodeArray Elements =
nullptr);
919 DIFile *File,
unsigned Line,
920 DINodeArray Elements =
nullptr);
930 DIFile *File,
unsigned Line,
932 DINodeArray Elements =
nullptr);
941 DIExpression *Expr,
const DILocation *
DL,
942 BasicBlock *InsertAtEnd);
959 DILocalVariable *SrcVar, DIExpression *ValExpr,
960 Value *
Addr, DIExpression *AddrExpr,
961 const DILocation *
DL);
970 DIExpression *Expr,
const DILocation *
DL,
971 Instruction *InsertBefore);
977 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
978 Instruction *InsertBefore);
984 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
985 BasicBlock *InsertAtEnd);
994 DILocalVariable *VarInfo,
995 DIExpression *Expr,
const DILocation *
DL,
996 BasicBlock *InsertAtEnd);
1005 DILocalVariable *VarInfo,
1006 DIExpression *Expr,
const DILocation *
DL,
1007 Instruction *InsertBefore);
1014 DIType *VTableHolder);
1022 DINodeArray TParams = DINodeArray());
1032 template <
class NodeTy>
1034 if (
N.get() == Replacement)
1037 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 * 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="")
Create debugging information entry for a struct.
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.
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.
DIExpression * createExpression(ArrayRef< uint64_t > Addr=std::nullopt)
Create a new descriptor for the specified variable which has a complex address expression for its add...
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.
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.
DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero)
Create debugging information entry for a basic type.
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.
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.
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