14#ifndef LLVM_IR_DIBUILDER_H
15#define LLVM_IR_DIBUILDER_H
40 class DbgAssignIntrinsic;
65 bool AllowUnresolvedNodes;
74 SubprogramTrackedNodes;
77 getImportTrackingVector(
const DIScope *S) {
78 return isa_and_nonnull<DILocalScope>(S)
79 ? getSubprogramNodesTrackingVector(S)
83 getSubprogramNodesTrackingVector(
const DIScope *S) {
84 return SubprogramTrackedNodes[cast<DILocalScope>(S)->getSubprogram()];
90 void trackIfUnresolved(
MDNode *
N);
162 bool isOptimized,
StringRef Flags,
unsigned RV,
166 uint64_t DWOId = 0,
bool SplitDebugInlining =
true,
167 bool DebugInfoForProfiling =
false,
170 bool RangesBaseAddress =
false,
StringRef SysRoot = {},
180 StringRef Filename, StringRef Directory,
181 std::optional<DIFile::ChecksumInfo<StringRef>> Checksum = std::nullopt,
182 std::optional<StringRef> Source = std::nullopt);
190 DIMacro *
createMacro(DIMacroFile *Parent,
unsigned Line,
unsigned MacroType,
191 StringRef
Name, StringRef Value = StringRef());
205 bool IsUnsigned =
false);
235 DIExpression *StrLocationExp =
nullptr);
243 DIExpression *StringLengthExp,
244 DIExpression *StrLocationExp =
nullptr);
262 std::optional<unsigned> DWARFAddressSpace = std::nullopt,
263 StringRef
Name =
"", DINodeArray Annotations =
nullptr);
278 unsigned Tag, DIType *RTy,
uint64_t SizeInBits = 0,
280 std::optional<unsigned> DWARFAddressSpace = std::nullopt);
292 unsigned LineNo, DIScope *Context,
295 DINodeArray Annotations =
nullptr);
298 DIDerivedType *
createFriend(DIType *Ty, DIType *FriendTy);
324 DIFile *File,
unsigned LineNo,
328 DINodeArray Annotations =
nullptr);
344 DIFile *File,
unsigned LineNo,
348 Constant *Discriminant,
363 DIFile *File,
unsigned LineNo,
368 DINodeArray Annotations =
nullptr);
381 DIFile *File,
unsigned LineNo,
400 DIType *Ty, MDNode *PropertyNode);
413 StringRef GetterName,
414 StringRef SetterName,
415 unsigned PropertyAttributes, DIType *Ty);
434 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
437 DIType *VTableHolder =
nullptr, MDNode *TemplateParms =
nullptr,
438 StringRef UniqueIdentifier =
"");
452 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
454 DIType *DerivedFrom, DINodeArray Elements,
unsigned RunTimeLang = 0,
455 DIType *VTableHolder =
nullptr, StringRef UniqueIdentifier =
"");
469 DIFile *File,
unsigned LineNumber,
472 DINodeArray Elements,
473 unsigned RunTimeLang = 0,
474 StringRef UniqueIdentifier =
"");
490 DIFile *File,
unsigned LineNumber,
493 DIDerivedType *Discriminator,
494 DINodeArray Elements,
495 StringRef UniqueIdentifier =
"");
515 DITemplateValueParameter *
517 bool IsDefault, Constant *Val);
525 DITemplateValueParameter *
527 StringRef Val,
bool IsDefault =
false);
558 PointerUnion<DIExpression *, DIVariable *> DataLocation =
nullptr,
559 PointerUnion<DIExpression *, DIVariable *> Associated =
nullptr,
560 PointerUnion<DIExpression *, DIVariable *> Allocated =
nullptr,
561 PointerUnion<DIExpression *, DIVariable *> Rank =
nullptr);
569 DIType *Ty, DINodeArray Subscripts);
584 DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNumber,
586 DIType *UnderlyingType, StringRef UniqueIdentifier =
"",
bool IsScoped =
false);
597 unsigned LineNo,
uint64_t SizeInBits,
623 DIScope *Scope, DIFile *
F,
unsigned Line,
624 unsigned RuntimeLang = 0,
627 StringRef UniqueIdentifier =
"");
631 unsigned Tag, StringRef
Name, DIScope *Scope, DIFile *
F,
unsigned Line,
632 unsigned RuntimeLang = 0,
uint64_t SizeInBits = 0,
634 StringRef UniqueIdentifier =
"", DINodeArray Annotations =
nullptr);
658 Metadata *UpperBound, Metadata *Stride);
682 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit,
bool isDefined =
true,
683 DIExpression *Expr =
nullptr, MDNode *Decl =
nullptr,
684 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0,
685 DINodeArray Annotations =
nullptr);
691 unsigned LineNo, DIType *Ty,
bool IsLocalToUnit, MDNode *Decl =
nullptr,
692 MDTuple *TemplateParams =
nullptr,
uint32_t AlignInBits = 0);
704 unsigned LineNo, DIType *Ty,
bool AlwaysPreserve =
false,
713 createLabel(DIScope *Scope, StringRef
Name, DIFile *File,
unsigned LineNo,
714 bool AlwaysPreserve =
false);
729 DIFile *File,
unsigned LineNo, DIType *Ty,
730 bool AlwaysPreserve =
false,
732 DINodeArray Annotations =
nullptr);
743 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
768 DITemplateParameterArray TParams =
nullptr,
770 DITypeArray ThrownTypes =
nullptr,
781 DITemplateParameterArray TParams =
nullptr,
782 DISubprogram *Decl =
nullptr, DITypeArray ThrownTypes =
nullptr);
806 unsigned VTableIndex = 0,
int ThisAdjustment = 0,
807 DIType *VTableHolder =
nullptr,
810 DITemplateParameterArray TParams =
nullptr,
811 DITypeArray ThrownTypes =
nullptr);
850 StringRef APINotesFile = {}, DIFile *File =
nullptr,
851 unsigned LineNo = 0,
bool IsDecl =
false);
860 unsigned Discriminator = 0);
869 unsigned Line,
unsigned Col);
878 DIFile *File,
unsigned Line,
879 DINodeArray Elements =
nullptr);
888 DIImportedEntity *NS, DIFile *File,
890 DINodeArray Elements =
nullptr);
899 DIFile *File,
unsigned Line,
900 DINodeArray Elements =
nullptr);
910 DIFile *File,
unsigned Line,
912 DINodeArray Elements =
nullptr);
920 Instruction *insertDeclare(
llvm::Value *Storage, DILocalVariable *VarInfo,
921 DIExpression *Expr,
const DILocation *
DL,
922 BasicBlock *InsertAtEnd);
938 DbgAssignIntrinsic *
insertDbgAssign(Instruction *LinkedInstr, Value *Val,
939 DILocalVariable *SrcVar,
940 DIExpression *ValExpr, Value *
Addr,
941 DIExpression *AddrExpr,
942 const DILocation *
DL);
950 Instruction *insertDeclare(
llvm::Value *Storage, DILocalVariable *VarInfo,
951 DIExpression *Expr,
const DILocation *
DL,
952 Instruction *InsertBefore);
958 Instruction *insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
959 Instruction *InsertBefore);
965 Instruction *insertLabel(DILabel *LabelInfo,
const DILocation *
DL,
966 BasicBlock *InsertAtEnd);
974 Instruction *insertDbgValueIntrinsic(
llvm::Value *Val,
975 DILocalVariable *VarInfo,
977 const DILocation *
DL,
978 BasicBlock *InsertAtEnd);
986 Instruction *insertDbgValueIntrinsic(
llvm::Value *Val,
987 DILocalVariable *VarInfo,
989 const DILocation *
DL,
990 Instruction *InsertBefore);
997 DIType *VTableHolder);
1005 DINodeArray TParams = DINodeArray());
1015 template <
class NodeTy>
1017 if (
N.get() == Replacement)
1020 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.
DbgAssignIntrinsic * insertDbgAssign(Instruction *LinkedInstr, Value *Val, DILocalVariable *SrcVar, DIExpression *ValExpr, Value *Addr, DIExpression *AddrExpr, const DILocation *DL)
Insert a new llvm.dbg.assign intrinsic call.
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 * 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.
DILexicalBlockFile * createLexicalBlockFile(DIScope *Scope, DIFile *File, unsigned Discriminator=0)
This creates a descriptor for a lexical block with a new file attached.
DIDerivedType * createStaticMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, DINode::DIFlags Flags, Constant *Val, uint32_t AlignInBits=0)
Create debugging information entry for a C++ static data member.
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.
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.
DICompositeType * createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements, DIType *UnderlyingType, StringRef UniqueIdentifier="", bool IsScoped=false)
Create debugging information entry for an enumeration.
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.
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)
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, DIType *VTableHolder=nullptr, MDNode *TemplateParms=nullptr, StringRef UniqueIdentifier="")
Create debugging information entry for a class.
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.
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.
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.