14#ifndef LLVM_IR_DIBUILDER_H
15#define LLVM_IR_DIBUILDER_H
62 bool AllowUnresolvedNodes;
71 SubprogramTrackedNodes;
74 getImportTrackingVector(
const DIScope *S) {
76 ? getSubprogramNodesTrackingVector(S)
80 getSubprogramNodesTrackingVector(
const DIScope *S) {
87 void trackIfUnresolved(
MDNode *
N);
151 uint64_t DWOId = 0,
bool SplitDebugInlining =
true,
152 bool DebugInfoForProfiling =
false,
155 bool RangesBaseAddress =
false,
StringRef SysRoot = {},
165 StringRef
Filename, StringRef Directory,
166 std::optional<DIFile::ChecksumInfo<StringRef>> Checksum = std::nullopt,
167 std::optional<StringRef> Source = std::nullopt);
176 unsigned MacroType, StringRef Name,
177 StringRef Value = StringRef());
186 unsigned Line, DIFile *File);
190 const APSInt &Value);
192 bool IsUnsigned =
false);
237 DIScope *Context,
uint64_t SizeInBits,
unsigned Encoding,
253 DIScope *Context,
uint64_t SizeInBits,
254 uint32_t AlignInBits,
unsigned Encoding,
268 DIScope *Context,
uint64_t SizeInBits,
269 uint32_t AlignInBits,
unsigned Encoding,
284 StringRef Name, DIFile *File,
unsigned LineNo, DIScope *Context,
302 DIExpression *StrLocationExp =
nullptr);
311 DIExpression *StrLocationExp =
nullptr);
329 std::optional<unsigned> DWARFAddressSpace = std::nullopt,
330 StringRef Name =
"", DINodeArray Annotations =
nullptr);
335 bool IsAddressDiscriminated,
336 unsigned ExtraDiscriminator,
bool IsaPointer,
337 bool authenticatesNullValues);
352 unsigned Tag, DIType *RTy,
uint64_t SizeInBits = 0,
354 std::optional<unsigned> DWARFAddressSpace = std::nullopt);
366 createTypedef(DIType *Ty, StringRef Name, DIFile *File,
unsigned LineNo,
367 DIScope *Context,
uint32_t AlignInBits = 0,
369 DINodeArray Annotations =
nullptr);
384 unsigned LineNo, DIScope *Context, DINodeArray TParams,
387 DINodeArray Annotations =
nullptr);
417 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNo,
436 DINodeArray Annotations =
nullptr);
454 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNo,
469 DINodeArray Elements,
470 Constant *Discriminant,
485 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNo,
488 DINodeArray Annotations =
nullptr);
502 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNo,
505 DINodeArray Annotations =
nullptr);
519 StringRef Name, DIFile *File,
520 unsigned LineNo, DIType *Ty,
522 Constant *Val,
unsigned Tag,
537 unsigned LineNo,
uint64_t SizeInBits,
541 MDNode *PropertyNode);
554 StringRef GetterName, StringRef SetterName,
555 unsigned PropertyAttributes, DIType *Ty);
577 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
580 unsigned RunTimeLang = 0, DIType *VTableHolder =
nullptr,
581 MDNode *TemplateParms =
nullptr, StringRef UniqueIdentifier =
"",
582 DINodeArray Annotations =
nullptr);
603 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
605 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
606 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"",
607 DIType *Specification =
nullptr,
uint32_t NumExtraInhabitants = 0,
608 DINodeArray Annotations =
nullptr);
629 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
631 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
632 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"",
633 DIType *Specification =
nullptr,
uint32_t NumExtraInhabitants = 0,
634 DINodeArray Annotations =
nullptr);
650 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
652 DINodeArray Elements,
unsigned RunTimeLang = 0,
653 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr);
670 unsigned LineNumber,
uint64_t SizeInBits,
672 DIDerivedType *Discriminator, DINodeArray Elements,
673 StringRef UniqueIdentifier =
"");
694 bool IsDefault, Constant *Val);
704 StringRef Val,
bool IsDefault =
false);
734 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
735 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
736 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
737 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr);
762 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
764 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
765 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
766 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
767 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr,
777 DINodeArray Subscripts,
795 DIScope *Scope, StringRef Name, DIFile *File,
unsigned LineNumber,
797 DIType *UnderlyingType,
unsigned RunTimeLang = 0,
798 StringRef UniqueIdentifier =
"",
bool IsScoped =
false,
799 std::optional<uint32_t> EnumKind = std::nullopt);
809 DIFile *File,
unsigned LineNo,
849 DIScope *Scope,
uint64_t SizeInBits,
857 unsigned Line,
unsigned RuntimeLang = 0,
859 StringRef UniqueIdentifier =
"",
860 std::optional<uint32_t> EnumKind = std::nullopt);
864 unsigned Tag, StringRef Name, DIScope *Scope, DIFile *
F,
unsigned Line,
865 unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
867 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr,
868 std::optional<uint32_t> EnumKind = std::nullopt);
918 DIScope *Context, StringRef Name, StringRef
LinkageName, DIFile *File,
919 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit,
bool isDefined =
true,
920 DIExpression *Expr =
nullptr, MDNode *Decl =
nullptr,
921 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0,
922 DINodeArray Annotations =
nullptr);
927 DIScope *Context, StringRef Name, StringRef
LinkageName, DIFile *File,
928 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit, MDNode *Decl =
nullptr,
929 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0);
941 unsigned LineNo, DIType *Ty,
bool AlwaysPreserve =
false,
950 unsigned LineNo,
unsigned Column,
952 std::optional<unsigned> CoroSuspendIdx,
953 bool AlwaysPreserve =
false);
968 DIFile *File,
unsigned LineNo, DIType *Ty,
969 bool AlwaysPreserve =
false,
971 DINodeArray Annotations =
nullptr);
982 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
1009 DITemplateParameterArray TParams =
nullptr,
1010 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr,
1012 bool UseKeyInstructions =
false);
1021 DITemplateParameterArray TParams =
nullptr,
1022 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr);
1047 int ThisAdjustment = 0,
DIType *VTableHolder =
nullptr,
1050 DITemplateParameterArray TParams =
nullptr,
1051 DITypeArray ThrownTypes =
nullptr,
bool UseKeyInstructions =
false);
1070 bool ExportSymbols);
1093 DIFile *File =
nullptr,
unsigned LineNo = 0,
1094 bool IsDecl =
false);
1104 unsigned Discriminator = 0);
1113 unsigned Line,
unsigned Col);
1123 unsigned Line, DINodeArray Elements =
nullptr);
1133 unsigned Line, DINodeArray Elements =
nullptr);
1143 unsigned Line, DINodeArray Elements =
nullptr);
1154 unsigned Line, StringRef Name =
"",
1155 DINodeArray Elements =
nullptr);
1164 DIExpression *Expr,
const DILocation *
DL,
1165 BasicBlock *InsertAtEnd);
1182 DILocalVariable *SrcVar,
1183 DIExpression *ValExpr, Value *Addr,
1184 DIExpression *AddrExpr,
1185 const DILocation *
DL);
1194 DILocalVariable *VarInfo,
1195 DIExpression *Expr,
const DILocation *
DL,
1196 InsertPosition InsertPt);
1205 DILocalVariable *VarInfo,
1207 const DILocation *
DL,
1208 InsertPosition InsertPt);
1215 InsertPosition InsertPt);
1224 DILocalVariable *VarInfo,
1225 DIExpression *Expr,
const DILocation *
DL,
1226 InsertPosition InsertPt);
1233 DIType *VTableHolder);
1241 DINodeArray TParams = DINodeArray());
1251 template <
class NodeTy>
1253 if (
N.get() == Replacement)
1256 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.
This file implements a map that provides insertion order iteration.
static constexpr StringLiteral Filename
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.
This is an important base class in LLVM.
static LLVM_ABI DIType * createObjectPointerType(DIType *Ty, bool Implicit)
Create a uniqued clone of Ty with FlagObjectPointer set.
LLVM_ABI DIBasicType * createUnspecifiedParameter()
Create unspecified parameter type for a subroutine type.
LLVM_ABI 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...
LLVM_ABI DITemplateValueParameter * createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val, bool IsDefault=false)
Create debugging information for a template template parameter.
NodeTy * replaceTemporary(TempMDNode &&N, NodeTy *Replacement)
Replace a temporary node.
LLVM_ABI 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.
LLVM_ABI DbgRecord * insertDbgAssign(Instruction *LinkedInstr, Value *Val, DILocalVariable *SrcVar, DIExpression *ValExpr, Value *Addr, DIExpression *AddrExpr, const DILocation *DL)
Insert a new dbg_assign record.
DIBuilder & operator=(const DIBuilder &)=delete
LLVM_ABI void finalize()
Construct any deferred debug info descriptors.
LLVM_ABI DIMacro * createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef())
Create debugging information entry for a macro.
LLVM_ABI 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.
LLVM_ABI DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts, Metadata *BitStride=nullptr)
Create debugging information entry for a vector type.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI DILexicalBlockFile * createLexicalBlockFile(DIScope *Scope, DIFile *File, unsigned Discriminator=0)
This creates a descriptor for a lexical block with a new file attached.
LLVM_ABI void finalizeSubprogram(DISubprogram *SP)
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.
LLVM_ABI DIDerivedType * createQualifiedType(unsigned Tag, DIType *FromTy)
Create debugging information entry for a qualified type, e.g.
LLVM_ABI 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.
LLVM_ABI 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 LLVM_ABI DIType * createArtificialType(DIType *Ty)
Create a uniqued clone of Ty with FlagArtificial set.
LLVM_ABI DIDerivedType * createBitFieldMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, Metadata *SizeInBits, Metadata *OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a bit field member.
LLVM_ABI DISubroutineType * createSubroutineType(DITypeArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
LLVM_ABI 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="", DINodeArray Annotations=nullptr)
Create debugging information entry for an union.
LLVM_ABI 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, bool UseKeyInstructions=false)
Create a new descriptor for the specified C++ method.
LLVM_ABI DINamespace * createNameSpace(DIScope *Scope, StringRef Name, bool ExportSymbols)
This creates new descriptor for a namespace with the specified parent scope.
LLVM_ABI DIStringType * createStringType(StringRef Name, uint64_t SizeInBits)
Create debugging information entry for a string type.
LLVM_ABI DILexicalBlock * createLexicalBlock(DIScope *Scope, DIFile *File, unsigned Line, unsigned Col)
This creates a descriptor for a lexical block with the specified parent context.
LLVM_ABI DICompositeType * createStructType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, Metadata *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, DINodeArray Annotations=nullptr)
Create debugging information entry for a struct.
LLVM_ABI DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata * > Elements)
Get a DIMacroNodeArray, create one if required.
LLVM_ABI DbgRecord * insertDbgValue(llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt)
Insert a new dbg_value record.
LLVM_ABI DIDerivedType * createMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, Metadata *SizeInBits, uint32_t AlignInBits, Metadata *OffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a member.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI DIBasicType * createNullPtrType()
Create C++11 nullptr type.
LLVM_ABI DICommonBlock * createCommonBlock(DIScope *Scope, DIGlobalVariable *decl, StringRef Name, DIFile *File, unsigned LineNo)
Create common block entry for a Fortran common block.
LLVM_ABI DIDerivedType * createFriend(DIType *Ty, DIType *FriendTy)
Create debugging information entry for a 'friend'.
LLVM_ABI DILabel * createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, unsigned Column, bool IsArtificial, std::optional< unsigned > CoroSuspendIdx, bool AlwaysPreserve=false)
Create a new descriptor for an label.
LLVM_ABI void retainType(DIScope *T)
Retain DIScope* in a module even if it is not referenced through debug info anchors.
LLVM_ABI 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
LLVM_ABI 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="", bool UseKeyInstructions=false)
Create a new descriptor for the specified subprogram.
LLVM_ABI 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.
LLVM_ABI DITemplateValueParameter * createTemplateParameterPack(DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val)
Create debugging information for a template parameter pack.
LLVM_ABI 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.
LLVM_ABI 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="", DINodeArray Annotations=nullptr)
Create debugging information entry for a class.
LLVM_ABI DIFixedPointType * createRationalFixedPointType(StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, APInt Numerator, APInt Denominator)
Create debugging information entry for an arbitrary rational fixed-point type.
LLVM_ABI 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, std::optional< uint32_t > EnumKind=std::nullopt)
Create a temporary forward-declared type.
LLVM_ABI DIFixedPointType * createDecimalFixedPointType(StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, int Factor)
Create debugging information entry for a decimal fixed-point type.
LLVM_ABI DITypeArray getOrCreateTypeArray(ArrayRef< Metadata * > Elements)
Get a DITypeArray, create one if required.
LLVM_ABI 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, std::optional< uint32_t > EnumKind=std::nullopt)
Create debugging information entry for an enumeration.
LLVM_ABI DIFixedPointType * createBinaryFixedPointType(StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, int Factor)
Create debugging information entry for a binary fixed-point type.
LLVM_ABI DbgRecord * insertDeclareValue(Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt)
Insert a new dbg_declare_value record.
LLVM_ABI DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero, uint32_t NumExtraInhabitants=0, uint32_t DataSizeInBits=0)
Create debugging information entry for a basic type.
LLVM_ABI DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
Create a descriptor for a value range.
LLVM_ABI DISubrangeType * createSubrangeType(StringRef Name, DIFile *File, unsigned LineNo, DIScope *Scope, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *Ty, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride, Metadata *Bias)
Create a type describing a subrange of another type.
LLVM_ABI 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.
LLVM_ABI DIMacroFile * createTempMacroFile(DIMacroFile *Parent, unsigned Line, DIFile *File)
Create debugging information temporary entry for a macro file.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI DbgRecord * insertDeclare(Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, BasicBlock *InsertAtEnd)
Insert a new dbg_declare record.
LLVM_ABI DINodeArray getOrCreateArray(ArrayRef< Metadata * > Elements)
Get a DINodeArray, create one if required.
LLVM_ABI DICompileUnit * createCompileUnit(DISourceLanguageName 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...
LLVM_ABI DIEnumerator * createEnumerator(StringRef Name, const APSInt &Value)
Create a single enumerator value.
LLVM_ABI DITemplateTypeParameter * createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault)
Create debugging information for template type parameter.
LLVM_ABI DIBuilder(Module &M, bool AllowUnresolved=true, DICompileUnit *CU=nullptr)
Construct a builder for a module.
LLVM_ABI DIExpression * createExpression(ArrayRef< uint64_t > Addr={})
Create a new descriptor for the specified variable which has a complex address expression for its add...
LLVM_ABI DIDerivedType * createPtrAuthQualifiedType(DIType *FromTy, unsigned Key, bool IsAddressDiscriminated, unsigned ExtraDiscriminator, bool IsaPointer, bool authenticatesNullValues)
Create a __ptrauth qualifier.
LLVM_ABI DbgRecord * insertLabel(DILabel *LabelInfo, const DILocation *DL, InsertPosition InsertPt)
Insert a new dbg_label record.
LLVM_ABI 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="", std::optional< uint32_t > EnumKind=std::nullopt)
Create a permanent forward-declared type.
LLVM_ABI 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.
LLVM_ABI DIImportedEntity * createImportedModule(DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr)
Create a descriptor for an imported module.
LLVM_ABI DIImportedEntity * createImportedDeclaration(DIScope *Context, DINode *Decl, DIFile *File, unsigned Line, StringRef Name="", DINodeArray Elements=nullptr)
Create a descriptor for an imported function.
LLVM_ABI 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 LLVM_ABI DISubprogram * createArtificialSubprogram(DISubprogram *SP)
Create a distinct clone of SP with FlagArtificial set.
LLVM_ABI DIGenericSubrange * getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride)
LLVM_ABI DIBasicType * createUnspecifiedType(StringRef Name)
Create a DWARF unspecified type.
LLVM_ABI DIObjCProperty * createObjCProperty(StringRef Name, DIFile *File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, unsigned PropertyAttributes, DIType *Ty)
Create debugging information entry for Objective-C property.
LLVM_ABI DITemplateValueParameter * createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault, Constant *Val)
Create debugging information for template value parameter.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI void replaceArrays(DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray())
Replace arrays on a composite type.
LLVM_ABI 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.
Wrapper structure that holds source language identity metadata that includes language name,...
Subprogram description. Uses SubclassData1.
DISPFlags
Debug info subprogram flags.
Type array for a subprogram.
Base class for non-instruction debug metadata records that have positions within IR.
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.
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.
Represent a constant reference to a string, i.e.
LLVM Value Representation.
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
This is an optimization pass for GlobalISel generic memory operations.
@ Implicit
Not emitted register (e.g. carry, or temporary result).
bool isa_and_nonnull(const Y &Val)
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
ArrayRef(const T &OneElt) -> ArrayRef< T >
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.