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);
325 unsigned LineNo, DIScope *Context,
329 DINodeArray Annotations =
nullptr);
332 DIDerivedType *
createFriend(DIType *Ty, DIType *FriendTy);
358 DIFile *File,
unsigned LineNo,
362 DINodeArray Annotations =
nullptr);
378 DIFile *File,
unsigned LineNo,
382 Constant *Discriminant,
397 DIFile *File,
unsigned LineNo,
402 DINodeArray Annotations =
nullptr);
416 DIFile *File,
unsigned LineNo,
418 Constant *Val,
unsigned Tag,
435 DIType *Ty, MDNode *PropertyNode);
448 StringRef GetterName,
449 StringRef SetterName,
450 unsigned PropertyAttributes, DIType *Ty);
470 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
473 unsigned RunTimeLang = 0, DIType *VTableHolder =
nullptr,
474 MDNode *TemplateParms =
nullptr, StringRef UniqueIdentifier =
"");
488 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
490 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
491 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"");
505 DIFile *File,
unsigned LineNumber,
508 DINodeArray Elements,
509 unsigned RunTimeLang = 0,
510 StringRef UniqueIdentifier =
"");
526 DIFile *File,
unsigned LineNumber,
529 DIDerivedType *Discriminator,
530 DINodeArray Elements,
531 StringRef UniqueIdentifier =
"");
551 DITemplateValueParameter *
553 bool IsDefault, Constant *Val);
561 DITemplateValueParameter *
563 StringRef Val,
bool IsDefault =
false);
594 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
595 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
596 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
597 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr);
605 DIType *Ty, DINodeArray Subscripts);
622 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
624 DIType *UnderlyingType,
unsigned RunTimeLang = 0,
625 StringRef UniqueIdentifier =
"",
bool IsScoped =
false);
635 unsigned LineNo,
uint64_t SizeInBits,
661 DIScope *Scope, DIFile *
F,
unsigned Line,
662 unsigned RuntimeLang = 0,
665 StringRef UniqueIdentifier =
"");
669 unsigned Tag, StringRef
Name, DIScope *Scope, DIFile *
F,
unsigned Line,
670 unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
672 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr);
696 Metadata *UpperBound, Metadata *Stride);
720 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit,
bool isDefined =
true,
721 DIExpression *Expr =
nullptr, MDNode *Decl =
nullptr,
722 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0,
723 DINodeArray Annotations =
nullptr);
729 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit, MDNode *Decl =
nullptr,
730 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0);
742 unsigned LineNo, DIType *Ty,
bool AlwaysPreserve =
false,
751 createLabel(DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNo,
752 bool AlwaysPreserve =
false);
767 DIFile *File,
unsigned LineNo, DIType *Ty,
768 bool AlwaysPreserve =
false,
770 DINodeArray Annotations =
nullptr);
781 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
806 DITemplateParameterArray TParams =
nullptr,
808 DITypeArray ThrownTypes =
nullptr,
819 DITemplateParameterArray TParams =
nullptr,
820 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr);
844 unsigned VTableIndex = 0,
int ThisAdjustment = 0,
845 DIType *VTableHolder =
nullptr,
848 DITemplateParameterArray TParams =
nullptr,
849 DITypeArray ThrownTypes =
nullptr);
888 StringRef APINotesFile = {}, DIFile *File =
nullptr,
889 unsigned LineNo = 0,
bool IsDecl =
false);
898 unsigned Discriminator = 0);
907 unsigned Line,
unsigned Col);
916 DIFile *File,
unsigned Line,
917 DINodeArray Elements =
nullptr);
926 DIImportedEntity *NS, DIFile *File,
928 DINodeArray Elements =
nullptr);
937 DIFile *File,
unsigned Line,
938 DINodeArray Elements =
nullptr);
948 DIFile *File,
unsigned Line,
950 DINodeArray Elements =
nullptr);
959 DIExpression *Expr,
const DILocation *
DL,
960 BasicBlock *InsertAtEnd);
977 DILocalVariable *SrcVar, DIExpression *ValExpr,
978 Value *
Addr, DIExpression *AddrExpr,
979 const DILocation *
DL);
988 DIExpression *Expr,
const DILocation *
DL,
989 Instruction *InsertBefore);
995 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
996 Instruction *InsertBefore);
1002 DbgInstPtr insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
1003 BasicBlock *InsertAtEnd);
1012 DILocalVariable *VarInfo,
1013 DIExpression *Expr,
const DILocation *
DL,
1014 BasicBlock *InsertAtEnd);
1023 DILocalVariable *VarInfo,
1024 DIExpression *Expr,
const DILocation *
DL,
1025 Instruction *InsertBefore);
1032 DIType *VTableHolder);
1040 DINodeArray TParams = DINodeArray());
1050 template <
class NodeTy>
1052 if (
N.get() == Replacement)
1055 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.
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.
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