LLVM 22.0.0git
|
#include "llvm/IR/DIBuilder.h"
Public Member Functions | |
LLVM_ABI | DIBuilder (Module &M, bool AllowUnresolved=true, DICompileUnit *CU=nullptr) |
Construct a builder for a module. | |
DIBuilder (const DIBuilder &)=delete | |
DIBuilder & | operator= (const DIBuilder &)=delete |
LLVM_ABI void | finalize () |
Construct any deferred debug info descriptors. | |
LLVM_ABI void | finalizeSubprogram (DISubprogram *SP) |
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards. | |
LLVM_ABI 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 compilation. | |
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 DIMacro * | createMacro (DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef()) |
Create debugging information entry for a macro. | |
LLVM_ABI DIMacroFile * | createTempMacroFile (DIMacroFile *Parent, unsigned Line, DIFile *File) |
Create debugging information temporary entry for a macro file. | |
LLVM_ABI DIEnumerator * | createEnumerator (StringRef Name, const APSInt &Value) |
Create a single enumerator value. | |
LLVM_ABI DIEnumerator * | createEnumerator (StringRef Name, uint64_t Val, bool IsUnsigned=false) |
LLVM_ABI DIBasicType * | createUnspecifiedType (StringRef Name) |
Create a DWARF unspecified type. | |
LLVM_ABI DIBasicType * | createNullPtrType () |
Create C++11 nullptr type. | |
LLVM_ABI DIBasicType * | createBasicType (StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero, uint32_t NumExtraInhabitants=0) |
Create debugging information entry for a basic type. | |
LLVM_ABI DIFixedPointType * | createBinaryFixedPointType (StringRef Name, 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 DIFixedPointType * | createDecimalFixedPointType (StringRef Name, 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 DIFixedPointType * | createRationalFixedPointType (StringRef Name, 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 DIStringType * | createStringType (StringRef Name, uint64_t SizeInBits) |
Create debugging information entry for a string type. | |
LLVM_ABI DIStringType * | createStringType (StringRef Name, DIVariable *StringLength, DIExpression *StrLocationExp=nullptr) |
Create debugging information entry for Fortran assumed length string type. | |
LLVM_ABI DIStringType * | createStringType (StringRef Name, DIExpression *StringLengthExp, DIExpression *StrLocationExp=nullptr) |
Create debugging information entry for Fortran assumed length string type. | |
LLVM_ABI DIDerivedType * | createQualifiedType (unsigned Tag, DIType *FromTy) |
Create debugging information entry for a qualified type, e.g. | |
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 DIDerivedType * | createPtrAuthQualifiedType (DIType *FromTy, unsigned Key, bool IsAddressDiscriminated, unsigned ExtraDiscriminator, bool IsaPointer, bool authenticatesNullValues) |
Create a __ptrauth qualifier. | |
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 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 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 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. | |
LLVM_ABI DIDerivedType * | createFriend (DIType *Ty, DIType *FriendTy) |
Create debugging information entry for a 'friend'. | |
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 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 * | 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. | |
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 DIDerivedType * | createVariantMemberType (DIScope *Scope, DINodeArray Elements, Constant *Discriminant, DIType *Ty) |
Create debugging information entry for a variant. | |
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 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. | |
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 * | 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. | |
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 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. | |
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) |
Create debugging information entry for a struct. | |
LLVM_ABI DICompositeType * | createStructType (DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, StringRef UniqueIdentifier="", DIType *Specification=nullptr, uint32_t NumExtraInhabitants=0) |
Create debugging information entry for a struct. | |
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="") |
Create debugging information entry for an union. | |
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 DITemplateTypeParameter * | createTemplateTypeParameter (DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault) |
Create debugging information for template type parameter. | |
LLVM_ABI DITemplateValueParameter * | createTemplateValueParameter (DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault, Constant *Val) |
Create debugging information for template value parameter. | |
LLVM_ABI DITemplateValueParameter * | createTemplateTemplateParameter (DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val, bool IsDefault=false) |
Create debugging information for a template template parameter. | |
LLVM_ABI DITemplateValueParameter * | createTemplateParameterPack (DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val) |
Create debugging information for a template parameter pack. | |
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 DICompositeType * | createArrayType (DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, 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, Metadata *BitStride=nullptr) |
Create debugging information entry for an array. | |
LLVM_ABI DICompositeType * | createVectorType (uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts) |
Create debugging information entry for a vector type. | |
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 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 DISubroutineType * | createSubroutineType (DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0) |
Create subroutine type. | |
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 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 * | 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 void | retainType (DIScope *T) |
Retain DIScope* in a module even if it is not referenced through debug info anchors. | |
LLVM_ABI DIBasicType * | createUnspecifiedParameter () |
Create unspecified parameter type for a subroutine type. | |
LLVM_ABI DINodeArray | getOrCreateArray (ArrayRef< Metadata * > Elements) |
Get a DINodeArray, create one if required. | |
LLVM_ABI DIMacroNodeArray | getOrCreateMacroArray (ArrayRef< Metadata * > Elements) |
Get a DIMacroNodeArray, create one if required. | |
LLVM_ABI DITypeRefArray | getOrCreateTypeArray (ArrayRef< Metadata * > Elements) |
Get a DITypeRefArray, create one if required. | |
LLVM_ABI DISubrange * | getOrCreateSubrange (int64_t Lo, int64_t Count) |
Create a descriptor for a value range. | |
LLVM_ABI DISubrange * | getOrCreateSubrange (int64_t Lo, Metadata *CountNode) |
LLVM_ABI DISubrange * | getOrCreateSubrange (Metadata *Count, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride) |
LLVM_ABI DIGenericSubrange * | getOrCreateGenericSubrange (DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride) |
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 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 RAUWed. | |
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. | |
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 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 DIExpression * | createExpression (ArrayRef< uint64_t > Addr={}) |
Create a new descriptor for the specified variable which has a complex address expression for its address. | |
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 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 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 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 DICommonBlock * | createCommonBlock (DIScope *Scope, DIGlobalVariable *decl, StringRef Name, DIFile *File, unsigned LineNo) |
Create common block entry for a Fortran common block. | |
LLVM_ABI DINamespace * | createNameSpace (DIScope *Scope, StringRef Name, bool ExportSymbols) |
This creates new descriptor for a namespace with the specified parent scope. | |
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. | |
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 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 DIImportedEntity * | createImportedModule (DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr) |
Create a descriptor for an imported module. | |
LLVM_ABI DIImportedEntity * | createImportedModule (DIScope *Context, DIImportedEntity *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr) |
Create a descriptor for an imported module. | |
LLVM_ABI DIImportedEntity * | createImportedModule (DIScope *Context, DIModule *M, 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 DbgInstPtr | insertDeclare (llvm::Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, BasicBlock *InsertAtEnd) |
Insert a new llvm.dbg.declare intrinsic call. | |
LLVM_ABI 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. | |
LLVM_ABI DbgInstPtr | insertDeclare (llvm::Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt) |
Insert a new llvm.dbg.declare intrinsic call. | |
LLVM_ABI DbgInstPtr | insertLabel (DILabel *LabelInfo, const DILocation *DL, InsertPosition InsertPt) |
Insert a new llvm.dbg.label intrinsic call. | |
LLVM_ABI DbgInstPtr | insertDbgValueIntrinsic (llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt) |
Insert a new llvm.dbg.value intrinsic call. | |
LLVM_ABI void | replaceVTableHolder (DICompositeType *&T, DIType *VTableHolder) |
Replace the vtable holder in the given type. | |
LLVM_ABI void | replaceArrays (DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray()) |
Replace arrays on a composite type. | |
template<class NodeTy > | |
NodeTy * | replaceTemporary (TempMDNode &&N, NodeTy *Replacement) |
Replace a temporary node. | |
Static Public Member Functions | |
static LLVM_ABI DISubprogram * | createArtificialSubprogram (DISubprogram *SP) |
Create a distinct clone of SP with FlagArtificial set. | |
static LLVM_ABI DIType * | createArtificialType (DIType *Ty) |
Create a uniqued clone of Ty with FlagArtificial set. | |
static LLVM_ABI DIType * | createObjectPointerType (DIType *Ty, bool Implicit) |
Create a uniqued clone of Ty with FlagObjectPointer set. | |
Definition at line 46 of file DIBuilder.h.
|
explicit |
Construct a builder for a module.
If AllowUnresolved
, collect unresolved nodes attached to the module in order to resolve cycles during finalize().
If CU
is given a value other than nullptr, then set CUNode
to CU.
Definition at line 27 of file DIBuilder.cpp.
References llvm::from_range, llvm::DICompileUnit::getEnumTypes(), llvm::DICompileUnit::getGlobalVariables(), llvm::DICompileUnit::getImportedEntities(), llvm::DICompileUnit::getMacros(), and llvm::DICompileUnit::getRetainedTypes().
DICompositeType * DIBuilder::createArrayType | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIFile * | File, | ||
unsigned | LineNumber, | ||
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 , |
||
Metadata * | BitStride = nullptr |
||
) |
Create debugging information entry for an array.
Scope | Scope in which this enumeration is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
Size | Array size. |
AlignInBits | Alignment. |
Ty | Element type. |
Subscripts | Subscripts. |
DataLocation | The location of the raw data of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Associated | The associated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Allocated | The allocated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Rank | The rank attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
BitStride | The bit size of an element of the array. |
Definition at line 696 of file DIBuilder.cpp.
References DL, llvm::MDNode::get(), getNonCompileUnitScope(), Name, and Size.
DICompositeType * DIBuilder::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.
Size | Array size. |
AlignInBits | Alignment. |
Ty | Element type. |
Subscripts | Subscripts. |
DataLocation | The location of the raw data of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Associated | The associated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Allocated | The allocated attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Rank | The rank attribute of a descriptor-based Fortran array, either a DIExpression* or a DIVariable*. |
Definition at line 686 of file DIBuilder.cpp.
References createArrayType(), DL, and Size.
Referenced by createArrayType(), and solveDIType().
|
static |
Create a distinct clone of SP
with FlagArtificial set.
Definition at line 731 of file DIBuilder.cpp.
References llvm::MDNode::replaceWithDistinct().
Create a uniqued clone of Ty
with FlagArtificial set.
Definition at line 742 of file DIBuilder.cpp.
References createTypeWithFlags(), and llvm::DIType::isArtificial().
DILocalVariable * DIBuilder::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.
This is a local variable that is not a subprogram parameter.
Scope
must be a DILocalScope, and thus its scope chain eventually leads to a DISubprogram.
If AlwaysPreserve
, this variable will be referenced from its containing subprogram, and will survive some optimizations.
Definition at line 924 of file DIBuilder.cpp.
References assert(), createLocalVariable(), and Name.
Referenced by buildFrameDebugInfo(), and fixupDebugInfoPostExtraction().
DIBasicType * DIBuilder::createBasicType | ( | StringRef | Name, |
uint64_t | SizeInBits, | ||
unsigned | Encoding, | ||
DINode::DIFlags | Flags = DINode::FlagZero , |
||
uint32_t | NumExtraInhabitants = 0 |
||
) |
Create debugging information entry for a basic type.
Name | Type name. |
SizeInBits | Size of the type. |
Encoding | DWARF encoding code, e.g., dwarf::DW_ATE_float. |
Flags | Optional DWARF attributes, e.g., DW_AT_endianity. |
NumExtraInhabitants | The number of extra inhabitants of the type. An extra inhabitant is a bit pattern that does not represent a valid value for instances of a given type. This is used by the Swift language. |
Definition at line 265 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
Referenced by buildFrameDebugInfo(), and solveDIType().
DIFixedPointType * DIBuilder::createBinaryFixedPointType | ( | StringRef | Name, |
uint64_t | SizeInBits, | ||
uint32_t | AlignInBits, | ||
unsigned | Encoding, | ||
DINode::DIFlags | Flags, | ||
int | Factor | ||
) |
Create debugging information entry for a binary fixed-point type.
Name | Type name. |
Encoding | DWARF encoding code, either dwarf::DW_ATE_signed_fixed or DW_ATE_unsigned_fixed. |
Flags | Optional DWARF attributes, e.g., DW_AT_endianity. |
Factor | Binary scale factor. |
Definition at line 275 of file DIBuilder.cpp.
References llvm::DIFixedPointType::FixedPointBinary, llvm::MDNode::get(), and Name.
DIDerivedType * DIBuilder::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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
OffsetInBits | Member offset. |
StorageOffsetInBits | Member storage offset. |
Flags | Flags to encode member attribute. |
Ty | Parent type. |
Annotations | Member annotations. |
Definition at line 474 of file DIBuilder.cpp.
References llvm::ConstantAsMetadata::get(), llvm::IntegerType::get(), llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIDerivedType * DIBuilder::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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
OffsetInBits | Member offset. |
StorageOffsetInBits | Member storage offset. |
Flags | Flags to encode member attribute. |
Ty | Parent type. |
Annotations | Member annotations. |
Definition at line 488 of file DIBuilder.cpp.
References llvm::ConstantAsMetadata::get(), llvm::IntegerType::get(), llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DICompositeType * DIBuilder::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.
Scope | Scope in which this class is defined. |
Name | class name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Elements | class members. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
VTableHolder | Debug info of the base class that contains vtable for this type. This is used in DW_AT_containing_type. See DWARF documentation for more info. |
TemplateParms | Template type parameters. |
UniqueIdentifier | A unique identifier for the class. |
Definition at line 574 of file DIBuilder.cpp.
References assert(), Context, llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DICommonBlock * DIBuilder::createCommonBlock | ( | DIScope * | Scope, |
DIGlobalVariable * | decl, | ||
StringRef | Name, | ||
DIFile * | File, | ||
unsigned | LineNo | ||
) |
Create common block entry for a Fortran common block.
Scope | Scope of this common block. |
decl | Global variable declaration. |
Name | The name of this common block. |
File | The file this common block is defined. |
LineNo | Line number. |
Definition at line 1033 of file DIBuilder.cpp.
References llvm::MDNode::get(), and Name.
DICompileUnit * DIBuilder::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 compilation.
Lang | Source programming language, eg. dwarf::DW_LANG_C99 |
File | File info. |
Producer | Identify the producer of debugging information and code. Usually this is a compiler version string. |
isOptimized | A boolean flag which indicates whether optimization is enabled or not. |
Flags | This string lists command line options. This string is directly embedded in debug info output which may be used by a tool analyzing generated debugging information. |
RV | This indicates runtime version for languages like Objective-C. |
SplitName | The name of the file that we'll split debug info out into. |
Kind | The kind of debug information to generate. |
DWOId | The DWOId if this is a split skeleton compile unit. |
SplitDebugInlining | Whether to emit inline debug info. |
DebugInfoForProfiling | Whether to emit extra debug info for profile collection. |
NameTableKind | Whether to emit .debug_gnu_pubnames, .debug_pubnames, or no pubnames at all. |
SysRoot | The clang system root (value of -isysroot). |
SDK | The SDK name. On Darwin, this is the last component of the sysroot. |
Definition at line 133 of file DIBuilder.cpp.
References llvm::NamedMDNode::addOperand(), assert(), llvm::dwarf::DW_LANG_lo_user, llvm::MDNode::getDistinct(), and llvm::Module::getOrInsertNamedMetadata().
|
inline |
Create an expression for a variable that does not have an address, but does have a constant value.
Definition at line 934 of file DIBuilder.h.
References llvm::MDNode::get().
Referenced by llvm::getExpressionForConstant().
DIFixedPointType * DIBuilder::createDecimalFixedPointType | ( | StringRef | Name, |
uint64_t | SizeInBits, | ||
uint32_t | AlignInBits, | ||
unsigned | Encoding, | ||
DINode::DIFlags | Flags, | ||
int | Factor | ||
) |
Create debugging information entry for a decimal fixed-point type.
Name | Type name. |
Encoding | DWARF encoding code, either dwarf::DW_ATE_signed_fixed or DW_ATE_unsigned_fixed. |
Flags | Optional DWARF attributes, e.g., DW_AT_endianity. |
Factor | Decimal scale factor. |
Definition at line 285 of file DIBuilder.cpp.
References llvm::DIFixedPointType::FixedPointDecimal, llvm::MDNode::get(), and Name.
DICompositeType * DIBuilder::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.
Scope | Scope in which this enumeration is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Elements | Enumeration elements. |
UnderlyingType | Underlying type of a C++11/ObjC fixed enum. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A unique identifier for the enum. |
IsScoped | Boolean flag indicate if this is C++11/ObjC 'enum class'. |
Definition at line 658 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIEnumerator * DIBuilder::createEnumerator | ( | StringRef | Name, |
const APSInt & | Value | ||
) |
Create a single enumerator value.
Definition at line 251 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
DIEnumerator * DIBuilder::createEnumerator | ( | StringRef | Name, |
uint64_t | Val, | ||
bool | IsUnsigned = false |
||
) |
Definition at line 244 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
DIExpression * DIBuilder::createExpression | ( | ArrayRef< uint64_t > | Addr = {} | ) |
Create a new descriptor for the specified variable which has a complex address expression for its address.
Addr | An array of complex address operations. |
Definition at line 966 of file DIBuilder.cpp.
References Addr, and llvm::MDNode::get().
Referenced by buildFrameDebugInfo(), createGlobalVariableExpression(), and fixupDebugInfoPostExtraction().
DIFile * DIBuilder::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.
Filename | File name. |
Directory | Directory. |
Checksum | Optional checksum kind (e.g. CSK_MD5, CSK_SHA1, etc.) and value. |
Source | Optional source text. |
Definition at line 213 of file DIBuilder.cpp.
References llvm::MDNode::get().
DICompositeType * DIBuilder::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.
Definition at line 771 of file DIBuilder.cpp.
References F, llvm::MDNode::get(), getNonCompileUnitScope(), Name, and RetTy.
DIDerivedType * DIBuilder::createFriend | ( | DIType * | Ty, |
DIType * | FriendTy | ||
) |
Create debugging information entry for a 'friend'.
Definition at line 401 of file DIBuilder.cpp.
References assert(), and llvm::MDNode::get().
DISubprogram * DIBuilder::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.
See comments in DISubprogram* for descriptions of these fields.
Scope | Function scope. |
Name | Function name. |
LinkageName | Mangled function name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Function type. |
ScopeLine | Set to the beginning of the scope this starts |
Flags | e.g. is this function prototyped or not. These flags are used to emit dwarf attributes. |
SPFlags | Additional flags specific to subprograms. |
TParams | Function template parameters. |
ThrownTypes | Exception types this function may throw. |
Annotations | Attribute Annotations. |
TargetFuncName | The name of the target function if this is a trampoline. |
UseKeyInstructions | Instruct DWARF emission to interpret Key Instructions metadata on instructions to determine is_stmt placement. |
Definition at line 977 of file DIBuilder.cpp.
References Context, getNonCompileUnitScope(), getSubprogram(), llvm::LinkageName, and Name.
Referenced by createBPFUnreachable(), and fixupDebugInfoPostExtraction().
DIGlobalVariableExpression * DIBuilder::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.
Context | Variable scope. |
Name | Name of the variable. |
LinkageName | Mangled name of the variable. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Variable Type. |
IsLocalToUnit | Boolean flag indicate whether this variable is externally visible or not. |
Expr | The location of the global relative to the attached GlobalVariable. |
Decl | Reference to the corresponding declaration. |
AlignInBits | Variable alignment(or 0 if no alignment attr was specified) |
Definition at line 871 of file DIBuilder.cpp.
References checkGlobalVariableScope(), Context, createExpression(), F, llvm::MDNode::get(), llvm::MDNode::getDistinct(), llvm::LinkageName, N, and Name.
DIImportedEntity * DIBuilder::createImportedDeclaration | ( | DIScope * | Context, |
DINode * | Decl, | ||
DIFile * | File, | ||
unsigned | Line, | ||
StringRef | Name = "" , |
||
DINodeArray | Elements = nullptr |
||
) |
Create a descriptor for an imported function.
Context | The scope this module is imported into. |
Decl | The declaration (or definition) of a function, type, or variable. |
File | File where the declaration is located. |
Line | Line number of the declaration. |
Elements | Renamed elements. |
Definition at line 203 of file DIBuilder.cpp.
DIImportedEntity * DIBuilder::createImportedModule | ( | DIScope * | Context, |
DIImportedEntity * | NS, | ||
DIFile * | File, | ||
unsigned | Line, | ||
DINodeArray | Elements = nullptr |
||
) |
Create a descriptor for an imported module.
Context | The scope this module is imported into. |
NS | An aliased namespace. |
File | File where the declaration is located. |
Line | Line number of the declaration. |
Elements | Renamed elements. |
Definition at line 185 of file DIBuilder.cpp.
References Context.
DIImportedEntity * DIBuilder::createImportedModule | ( | DIScope * | Context, |
DIModule * | M, | ||
DIFile * | File, | ||
unsigned | Line, | ||
DINodeArray | Elements = nullptr |
||
) |
Create a descriptor for an imported module.
Context | The scope this module is imported into. |
M | The module being imported here |
File | File where the declaration is located. |
Line | Line number of the declaration. |
Elements | Renamed elements. |
Definition at line 194 of file DIBuilder.cpp.
References Context.
DIImportedEntity * DIBuilder::createImportedModule | ( | DIScope * | Context, |
DINamespace * | NS, | ||
DIFile * | File, | ||
unsigned | Line, | ||
DINodeArray | Elements = nullptr |
||
) |
Create a descriptor for an imported module.
Context | The scope this module is imported into |
NS | The namespace being imported here. |
File | File where the declaration is located. |
Line | Line number of the declaration. |
Elements | Renamed elements. |
Definition at line 176 of file DIBuilder.cpp.
References Context.
DIDerivedType * DIBuilder::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.
Ty | Original type. |
BaseTy | Base type. Ty is inherits from base. |
BaseOffset | Base offset. |
VBPtrOffset | Virtual base pointer offset. |
Flags | Flags to describe inheritance attribute, e.g. private |
Definition at line 409 of file DIBuilder.cpp.
References assert(), llvm::ConstantAsMetadata::get(), llvm::IntegerType::get(), and llvm::MDNode::get().
DILabel * DIBuilder::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.
Scope
must be a DILocalScope, and thus its scope chain eventually leads to a DISubprogram.
The optimizer may remove labels. If there is an interest to preserve label info in such situation then append it to the list of retained nodes of the DISubprogram.
Definition at line 948 of file DIBuilder.cpp.
References Context, llvm::MDNode::get(), and Name.
DILexicalBlock * DIBuilder::createLexicalBlock | ( | DIScope * | Scope, |
DIFile * | File, | ||
unsigned | Line, | ||
unsigned | Col | ||
) |
This creates a descriptor for a lexical block with the specified parent context.
Scope | Parent lexical scope. |
File | Source file. |
Line | Line number. |
Col | Column number. |
Definition at line 1067 of file DIBuilder.cpp.
References llvm::MDNode::getDistinct(), and getNonCompileUnitScope().
DILexicalBlockFile * DIBuilder::createLexicalBlockFile | ( | DIScope * | Scope, |
DIFile * | File, | ||
unsigned | Discriminator = 0 |
||
) |
This creates a descriptor for a lexical block with a new file attached.
This merely extends the existing lexical block as it crosses a file.
Scope | Lexical block. |
File | Source file. |
Discriminator | DWARF path discriminator value. |
Definition at line 1061 of file DIBuilder.cpp.
References llvm::MDNode::get().
DIMacro * DIBuilder::createMacro | ( | DIMacroFile * | Parent, |
unsigned | Line, | ||
unsigned | MacroType, | ||
StringRef | Name, | ||
StringRef | Value = StringRef() |
||
) |
Create debugging information entry for a macro.
Parent | Macro parent (could be nullptr). |
Line | Source line number where the macro is defined. |
MacroType | DW_MACINFO_define or DW_MACINFO_undef. |
Name | Macro name. |
Value | Macro value. |
Definition at line 219 of file DIBuilder.cpp.
References assert(), llvm::dwarf::DW_MACINFO_define, llvm::dwarf::DW_MACINFO_undef, llvm::MDNode::get(), and Name.
DIDerivedType * DIBuilder::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.
PointeeTy | Type pointed to by this pointer. |
SizeInBits | Size. |
AlignInBits | Alignment. (optional) |
Class | Type for which this pointer points to members of. |
Definition at line 358 of file DIBuilder.cpp.
References llvm::sampleprof::Base, and llvm::MDNode::get().
DIDerivedType * DIBuilder::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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent type. |
Annotations | Member annotations. |
Definition at line 431 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
Referenced by buildFrameDebugInfo(), and solveDIType().
DIDerivedType * DIBuilder::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.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent type. |
Annotations | Member annotations. |
Definition at line 421 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DISubprogram * DIBuilder::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.
See comments in DISubprogram* for descriptions of these fields.
Scope | Function scope. |
Name | Function name. |
LinkageName | Mangled function name. |
File | File where this variable is defined. |
LineNo | Line number. |
Ty | Function type. |
VTableIndex | Index no of this method in virtual table, or -1u if unrepresentable. |
ThisAdjustment | MS ABI-specific adjustment of 'this' that occurs in the prologue. |
VTableHolder | Type that holds vtable. |
Flags | e.g. is this function prototyped or not. This flags are used to emit dwarf attributes. |
SPFlags | Additional flags specific to subprograms. |
TParams | Function template parameters. |
ThrownTypes | Exception types this function may throw. |
UseKeyInstructions | Enable Key Instructions debug info. |
Definition at line 1011 of file DIBuilder.cpp.
References assert(), Context, F, getNonCompileUnitScope(), getSubprogram(), llvm::LinkageName, and Name.
DIModule * DIBuilder::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.
Scope | Parent scope |
Name | Name of this module |
ConfigurationMacros | A space-separated shell-quoted list of -D macro definitions as they would appear on a command line. |
IncludePath | The path to the module map file. |
APINotesFile | The path to an API notes file for this module. |
File | Source file of the module. Used for Fortran modules. |
LineNo | Source line number of the module. Used for Fortran modules. |
IsDecl | This is a module declaration; default to false; when set to true, only Scope and Name are required as this entry is just a hint for the debugger to find the corresponding definition in the global scope. |
Definition at line 1052 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DINamespace * DIBuilder::createNameSpace | ( | DIScope * | Scope, |
StringRef | Name, | ||
bool | ExportSymbols | ||
) |
This creates new descriptor for a namespace with the specified parent scope.
Scope | Namespace scope |
Name | Name of this namespace |
ExportSymbols | True for C++ inline namespaces. |
Definition at line 1040 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIBasicType * DIBuilder::createNullPtrType | ( | ) |
Create C++11 nullptr type.
Definition at line 261 of file DIBuilder.cpp.
References createUnspecifiedType().
DIDerivedType * DIBuilder::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.
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Ty | Parent type. |
PropertyNode | Property associated with this ivar. |
Definition at line 515 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIObjCProperty * DIBuilder::createObjCProperty | ( | StringRef | Name, |
DIFile * | File, | ||
unsigned | LineNumber, | ||
StringRef | GetterName, | ||
StringRef | SetterName, | ||
unsigned | PropertyAttributes, | ||
DIType * | Ty | ||
) |
Create debugging information entry for Objective-C property.
Name | Property name. |
File | File where this property is defined. |
LineNumber | Line number. |
GetterName | Name of the Objective C property getter selector. |
SetterName | Name of the Objective C property setter selector. |
PropertyAttributes | Objective C property attributes. |
Ty | Type. |
Definition at line 526 of file DIBuilder.cpp.
References llvm::MDNode::get(), and Name.
Create a uniqued clone of Ty
with FlagObjectPointer set.
If Implicit
is true, also set FlagArtificial.
Definition at line 749 of file DIBuilder.cpp.
References createTypeWithFlags(), and llvm::DIType::isObjectPointer().
DILocalVariable * DIBuilder::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.
Scope
must be a DILocalScope, and thus its scope chain eventually leads to a DISubprogram.
ArgNo
is the index (starting from 1
) of this variable in the subprogram parameters. ArgNo
should not conflict with other parameters of the same subprogram.
If AlwaysPreserve
, this variable will be referenced from its containing subprogram, and will survive some optimizations.
Definition at line 936 of file DIBuilder.cpp.
References assert(), createLocalVariable(), and Name.
DIDerivedType * DIBuilder::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.
PointeeTy | Type pointed by this pointer. |
SizeInBits | Size. |
AlignInBits | Alignment. (optional) |
DWARFAddressSpace | DWARF address space. (optional) |
Name | Pointer type name. (optional) |
Annotations | Member annotations. |
Definition at line 347 of file DIBuilder.cpp.
References llvm::MDNode::get(), and Name.
Referenced by buildFrameDebugInfo(), and solveDIType().
DIDerivedType * DIBuilder::createPtrAuthQualifiedType | ( | DIType * | FromTy, |
unsigned | Key, | ||
bool | IsAddressDiscriminated, | ||
unsigned | ExtraDiscriminator, | ||
bool | IsaPointer, | ||
bool | authenticatesNullValues | ||
) |
Create a __ptrauth qualifier.
Definition at line 333 of file DIBuilder.cpp.
References llvm::MDNode::get().
DIDerivedType * DIBuilder::createQualifiedType | ( | unsigned | Tag, |
DIType * | FromTy | ||
) |
Create debugging information entry for a qualified type, e.g.
'const int'.
Tag | Tag identifing type, e.g. dwarf::TAG_volatile_type |
FromTy | Base Type. |
Definition at line 327 of file DIBuilder.cpp.
References llvm::MDNode::get().
DIFixedPointType * DIBuilder::createRationalFixedPointType | ( | StringRef | Name, |
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.
Name | Type name. |
Encoding | DWARF encoding code, either dwarf::DW_ATE_signed_fixed or DW_ATE_unsigned_fixed. |
Flags | Optional DWARF attributes, e.g., DW_AT_endianity. |
Numerator | Numerator of scale factor. |
Denominator | Denominator of scale factor. |
Definition at line 295 of file DIBuilder.cpp.
References llvm::DIFixedPointType::FixedPointRational, llvm::MDNode::get(), and Name.
DIDerivedType * DIBuilder::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.
Definition at line 370 of file DIBuilder.cpp.
References assert(), and llvm::MDNode::get().
DICompositeType * DIBuilder::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.
Definition at line 785 of file DIBuilder.cpp.
References F, getNonCompileUnitScope(), llvm::MDNode::getTemporary(), Name, and RetTy.
DIDerivedType * DIBuilder::createSetType | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIFile * | File, | ||
unsigned | LineNo, | ||
uint64_t | SizeInBits, | ||
uint32_t | AlignInBits, | ||
DIType * | Ty | ||
) |
Create debugging information entry for a set.
Scope | Scope in which this set is defined. |
Name | Set name. |
File | File where this set is defined. |
LineNo | Line number. |
SizeInBits | Set size. |
AlignInBits | Set alignment. |
Ty | Base type of the set. |
Definition at line 673 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIDerivedType * DIBuilder::createStaticMemberType | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIFile * | File, | ||
unsigned | LineNo, | ||
DIType * | Ty, | ||
DINode::DIFlags | Flags, | ||
llvm::Constant * | Val, | ||
unsigned | Tag, | ||
uint32_t | AlignInBits = 0 |
||
) |
Create debugging information entry for a C++ static data member.
Scope | Member scope. |
Name | Member name. |
File | File where this member is declared. |
LineNo | Line number. |
Ty | Type of the static member. |
Flags | Flags to encode member attribute, e.g. private. |
Val | Const initializer of the member. |
Tag | DWARF tag of the static member. |
AlignInBits | Member alignment. |
Definition at line 503 of file DIBuilder.cpp.
References llvm::MDNode::get(), getConstantOrNull(), getNonCompileUnitScope(), and Name.
DIStringType * DIBuilder::createStringType | ( | StringRef | Name, |
DIExpression * | StringLengthExp, | ||
DIExpression * | StrLocationExp = nullptr |
||
) |
Create debugging information entry for Fortran assumed length string type.
Name | Type name. |
StringLengthExp | String length expressed in DIExpression form. |
StrLocationExp | Optional memory location of the string. |
Definition at line 319 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
DIStringType * DIBuilder::createStringType | ( | StringRef | Name, |
DIVariable * | StringLength, | ||
DIExpression * | StrLocationExp = nullptr |
||
) |
Create debugging information entry for Fortran assumed length string type.
Name | Type name. |
StringLength | String length expressed as DIVariable *. |
StrLocationExp | Optional memory location of the string. |
Definition at line 311 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
DIStringType * DIBuilder::createStringType | ( | StringRef | Name, |
uint64_t | SizeInBits | ||
) |
Create debugging information entry for a string type.
Name | Type name. |
SizeInBits | Size of the type. |
Definition at line 305 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
DICompositeType * DIBuilder::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 |
||
) |
Create debugging information entry for a struct.
Scope | Scope in which this struct is defined. |
Name | Struct name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Elements | Struct elements. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A unique identifier for the struct. |
Specification | The type that this type completes. This is used by Swift to represent generic types. |
NumExtraInhabitants | The number of extra inhabitants of the type. An extra inhabitant is a bit pattern that does not represent a valid value for instances of a given type. This is used by the Swift language. |
Definition at line 592 of file DIBuilder.cpp.
References Context, llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
Referenced by buildFrameDebugInfo(), and solveDIType().
DICompositeType * DIBuilder::createStructType | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIFile * | File, | ||
unsigned | LineNumber, | ||
uint64_t | SizeInBits, | ||
uint32_t | AlignInBits, | ||
DINode::DIFlags | Flags, | ||
DIType * | DerivedFrom, | ||
DINodeArray | Elements, | ||
unsigned | RunTimeLang = 0 , |
||
DIType * | VTableHolder = nullptr , |
||
StringRef | UniqueIdentifier = "" , |
||
DIType * | Specification = nullptr , |
||
uint32_t | NumExtraInhabitants = 0 |
||
) |
Create debugging information entry for a struct.
Scope | Scope in which this struct is defined. |
Name | Struct name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Elements | Struct elements. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A unique identifier for the struct. |
Specification | The type that this type completes. This is used by Swift to represent generic types. |
NumExtraInhabitants | The number of extra inhabitants of the type. An extra inhabitant is a bit pattern that does not represent a valid value for instances of a given type. This is used by the Swift language. |
Definition at line 608 of file DIBuilder.cpp.
References Context, llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DISubrangeType * DIBuilder::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.
Scope | Scope in which this set is defined. |
Name | Set name. |
File | File where this set is defined. |
LineNo | Line number. |
SizeInBits | Size. |
AlignInBits | Alignment. |
Flags | Flags to encode attributes. |
Ty | Base type. |
LowerBound | Lower bound. |
UpperBound | Upper bound. |
Stride | Stride, if any. |
Bias | Bias, if any. |
Definition at line 852 of file DIBuilder.cpp.
References llvm::MDNode::get(), and Name.
DISubroutineType * DIBuilder::createSubroutineType | ( | DITypeRefArray | ParameterTypes, |
DINode::DIFlags | Flags = DINode::FlagZero , |
||
unsigned | CC = 0 |
||
) |
Create subroutine type.
ParameterTypes | An array of subroutine parameter types. This includes return type at 0th index. |
Flags | E.g.: LValueReference. These flags are used to emit dwarf attributes. |
CC | Calling convention, e.g. dwarf::DW_CC_normal |
Definition at line 652 of file DIBuilder.cpp.
References llvm::MDNode::get().
Referenced by createBPFUnreachable(), and fixupDebugInfoPostExtraction().
DISubprogram * DIBuilder::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.
Definition at line 996 of file DIBuilder.cpp.
References Context, getNonCompileUnitScope(), llvm::MDNode::getTemporary(), llvm::LinkageName, and Name.
DIGlobalVariable * DIBuilder::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 RAUWed.
Definition at line 890 of file DIBuilder.cpp.
References checkGlobalVariableScope(), Context, F, llvm::MDNode::getTemporary(), llvm::LinkageName, and Name.
DIDerivedType * DIBuilder::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.
Ty | Original type. |
Name | Alias name. |
File | File where this type is defined. |
LineNo | Line number. |
Context | The surrounding context for the alias. |
TParams | The template arguments. |
AlignInBits | Alignment. (optional) |
Flags | Flags to describe inheritance attribute (optional), e.g. private. |
Annotations | Annotations. (optional) |
Definition at line 391 of file DIBuilder.cpp.
References Context, llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DITemplateValueParameter * DIBuilder::createTemplateParameterPack | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIType * | Ty, | ||
DINodeArray | Val | ||
) |
Create debugging information for a template parameter pack.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
Val | An array of types in the pack. |
Definition at line 567 of file DIBuilder.cpp.
References Context, createTemplateValueParameterHelper(), llvm::MDNode::get(), and Name.
DITemplateValueParameter * DIBuilder::createTemplateTemplateParameter | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIType * | Ty, | ||
StringRef | Val, | ||
bool | IsDefault = false |
||
) |
Create debugging information for a template template parameter.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
Val | The fully qualified name of the template. |
IsDefault | Parameter is default or not. |
Definition at line 558 of file DIBuilder.cpp.
References Context, createTemplateValueParameterHelper(), llvm::MDString::get(), and Name.
DITemplateTypeParameter * DIBuilder::createTemplateTypeParameter | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIType * | Ty, | ||
bool | IsDefault | ||
) |
Create debugging information for template type parameter.
Scope | Scope in which this type is defined. |
Name | Type parameter name. |
Ty | Parameter type. |
IsDefault | Parameter is default or not |
Definition at line 534 of file DIBuilder.cpp.
References assert(), Context, llvm::MDNode::get(), and Name.
DITemplateValueParameter * DIBuilder::createTemplateValueParameter | ( | DIScope * | Scope, |
StringRef | Name, | ||
DIType * | Ty, | ||
bool | IsDefault, | ||
Constant * | Val | ||
) |
Create debugging information for template value parameter.
Scope | Scope in which this type is defined. |
Name | Value parameter name. |
Ty | Parameter type. |
IsDefault | Parameter is default or not |
Val | Constant parameter value. |
Definition at line 549 of file DIBuilder.cpp.
References Context, createTemplateValueParameterHelper(), getConstantOrNull(), and Name.
DIMacroFile * DIBuilder::createTempMacroFile | ( | DIMacroFile * | Parent, |
unsigned | Line, | ||
DIFile * | File | ||
) |
Create debugging information temporary entry for a macro file.
List of macro node direct children will be calculated by DIBuilder, using the Parent
relationship.
Parent | Macro file parent (could be nullptr). |
Line | Source line number where the macro file is included. |
File | File descriptor containing the name of the macro file. |
Definition at line 231 of file DIBuilder.cpp.
References llvm::dwarf::DW_MACINFO_start_file, and llvm::MDNode::getTemporary().
DIDerivedType * DIBuilder::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.
Ty | Original type. |
Name | Typedef name. |
File | File where this type is defined. |
LineNo | Line number. |
Context | The surrounding context for the typedef. |
AlignInBits | Alignment. (optional) |
Flags | Flags to describe inheritance attribute, e.g. private |
Annotations | Annotations. (optional) |
Definition at line 379 of file DIBuilder.cpp.
References Context, llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DICompositeType * DIBuilder::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.
Scope | Scope in which this union is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Elements | Union elements. |
RunTimeLang | Optional parameter, Objective-C runtime version. |
UniqueIdentifier | A unique identifier for the union. |
Definition at line 624 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DIBasicType * DIBuilder::createUnspecifiedParameter | ( | ) |
Create unspecified parameter type for a subroutine type.
Definition at line 769 of file DIBuilder.cpp.
DIBasicType * DIBuilder::createUnspecifiedType | ( | StringRef | Name | ) |
Create a DWARF unspecified type.
Definition at line 256 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), and Name.
Referenced by createNullPtrType().
DIDerivedType * DIBuilder::createVariantMemberType | ( | DIScope * | Scope, |
DINodeArray | Elements, | ||
Constant * | Discriminant, | ||
DIType * | Ty | ||
) |
Create debugging information entry for a variant.
A variant created this way "inlines" multiple members into the enclosing variant part.
Scope | Scope in which this variant is defined. |
Elements | Variant elements. |
Discriminant | The discriminant for this branch; null for the default branch. This may be a ConstantDataArray if the variant applies for multiple discriminants. |
Ty | Parent type. |
Definition at line 460 of file DIBuilder.cpp.
References createVariantMemberType(), llvm::MDNode::get(), and getNonCompileUnitScope().
DIDerivedType * DIBuilder::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.
A variant normally should be a member of a variant part.
Scope | Member scope. |
Name | Member name. |
File | File where this member is defined. |
LineNo | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
OffsetInBits | Member offset. |
Flags | Flags to encode member attribute, e.g. private |
Discriminant | The discriminant for this branch; null for the default branch. This may be a ConstantDataArray if the variant applies for multiple discriminants. |
Ty | Parent type. |
Definition at line 447 of file DIBuilder.cpp.
References assert(), llvm::MDNode::get(), getConstantOrNull(), getNonCompileUnitScope(), and Name.
Referenced by createVariantMemberType().
DICompositeType * DIBuilder::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.
A variant part normally has a discriminator (though this is not required) and a number of variant children.
Scope | Scope in which this union is defined. |
Name | Union name. |
File | File where this member is defined. |
LineNumber | Line number. |
SizeInBits | Member size. |
AlignInBits | Member alignment. |
Flags | Flags to encode member attribute, e.g. private |
Discriminator | Discriminant member |
Elements | Variant elements. |
UniqueIdentifier | A unique identifier for the union. |
Definition at line 638 of file DIBuilder.cpp.
References llvm::MDNode::get(), getNonCompileUnitScope(), and Name.
DICompositeType * DIBuilder::createVectorType | ( | uint64_t | Size, |
uint32_t | AlignInBits, | ||
DIType * | Ty, | ||
DINodeArray | Subscripts | ||
) |
Create debugging information entry for a vector type.
Size | Array size. |
AlignInBits | Alignment. |
Ty | Element type. |
Subscripts | Subscripts. |
Definition at line 720 of file DIBuilder.cpp.
References llvm::MDNode::get(), and Size.
void DIBuilder::finalize | ( | ) |
Construct any deferred debug info descriptors.
Definition at line 62 of file DIBuilder.cpp.
References assert(), llvm::dwarf::DW_MACINFO_start_file, llvm::SmallVectorBase< Size_T >::empty(), finalizeSubprogram(), llvm::MDNode::get(), llvm::MDTuple::get(), getOrCreateMacroArray(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), N, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::DICompileUnit::replaceEnumTypes(), llvm::DICompileUnit::replaceGlobalVariables(), llvm::DICompileUnit::replaceImportedEntities(), llvm::DICompileUnit::replaceMacros(), llvm::DICompileUnit::replaceRetainedTypes(), and replaceTemporary().
void DIBuilder::finalizeSubprogram | ( | DISubprogram * | SP | ) |
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.
Definition at line 54 of file DIBuilder.cpp.
References llvm::MDTuple::get().
Referenced by finalize(), and fixupDebugInfoPostExtraction().
Get a DINodeArray, create one if required.
Definition at line 801 of file DIBuilder.cpp.
References llvm::MDTuple::get().
Referenced by buildFrameDebugInfo(), and solveDIType().
DIGenericSubrange * DIBuilder::getOrCreateGenericSubrange | ( | DIGenericSubrange::BoundType | Count, |
DIGenericSubrange::BoundType | LowerBound, | ||
DIGenericSubrange::BoundType | UpperBound, | ||
DIGenericSubrange::BoundType | Stride | ||
) |
Definition at line 840 of file DIBuilder.cpp.
References llvm::MDNode::get().
Get a DIMacroNodeArray, create one if required.
Definition at line 806 of file DIBuilder.cpp.
References llvm::MDTuple::get().
Referenced by finalize().
DISubrange * DIBuilder::getOrCreateSubrange | ( | int64_t | Lo, |
int64_t | Count | ||
) |
Create a descriptor for a value range.
This implicitly uniques the values returned.
Definition at line 821 of file DIBuilder.cpp.
References llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::Type::getInt64Ty(), llvm::ConstantInt::getSigned(), and llvm::Lo.
Referenced by solveDIType().
DISubrange * DIBuilder::getOrCreateSubrange | ( | int64_t | Lo, |
Metadata * | CountNode | ||
) |
Definition at line 829 of file DIBuilder.cpp.
References llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::Type::getInt64Ty(), llvm::ConstantInt::getSigned(), and llvm::Lo.
DISubrange * DIBuilder::getOrCreateSubrange | ( | Metadata * | Count, |
Metadata * | LowerBound, | ||
Metadata * | UpperBound, | ||
Metadata * | Stride | ||
) |
Definition at line 835 of file DIBuilder.cpp.
References llvm::MDNode::get().
DITypeRefArray DIBuilder::getOrCreateTypeArray | ( | ArrayRef< Metadata * > | Elements | ) |
Get a DITypeRefArray, create one if required.
Definition at line 810 of file DIBuilder.cpp.
References llvm::MDNode::get(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by createBPFUnreachable(), and fixupDebugInfoPostExtraction().
DbgInstPtr DIBuilder::insertDbgAssign | ( | Instruction * | LinkedInstr, |
Value * | Val, | ||
DILocalVariable * | SrcVar, | ||
DIExpression * | ValExpr, | ||
Value * | Addr, | ||
DIExpression * | AddrExpr, | ||
const DILocation * | DL | ||
) |
Insert a new llvm.dbg.assign intrinsic call.
LinkedInstr | Instruction with a DIAssignID to link with the new intrinsic. The intrinsic will be inserted after this instruction. |
Val | The value component of this dbg.assign. |
SrcVar | Variable's debug info descriptor. |
ValExpr | A complex location expression to modify Val . |
Addr | The address component (store destination). |
AddrExpr | A complex location expression to modify Addr . NOTE: ValExpr carries the FragInfo for the variable. |
DL | Debug info location, usually: (line: 0, column: 0, scope: var-decl-scope). See getDebugValueLoc. |
Definition at line 1086 of file DIBuilder.cpp.
References Addr, assert(), llvm::DbgVariableRecord::createDVRAssign(), DL, llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::Instruction::getMetadata().
Referenced by migrateDebugInfo().
DbgInstPtr DIBuilder::insertDbgValueIntrinsic | ( | llvm::Value * | Val, |
DILocalVariable * | VarInfo, | ||
DIExpression * | Expr, | ||
const DILocation * | DL, | ||
InsertPosition | InsertPt | ||
) |
Insert a new llvm.dbg.value intrinsic call.
Val | llvm::Value of the variable |
VarInfo | Variable's debug info descriptor. |
Expr | A complex location expression. |
DL | Debug info location. |
InsertPt | Location for the new intrinsic. |
Definition at line 1117 of file DIBuilder.cpp.
References llvm::DbgVariableRecord::createDbgVariableRecord(), and DL.
Referenced by fixupDebugInfoPostExtraction().
DbgInstPtr DIBuilder::insertDeclare | ( | llvm::Value * | Storage, |
DILocalVariable * | VarInfo, | ||
DIExpression * | Expr, | ||
const DILocation * | DL, | ||
BasicBlock * | InsertAtEnd | ||
) |
Insert a new llvm.dbg.declare intrinsic call.
Storage | llvm::Value of the variable |
VarInfo | Variable's debug info descriptor. |
Expr | A complex location expression. |
DL | Debug info location. |
InsertAtEnd | Location for the new intrinsic. |
Definition at line 1075 of file DIBuilder.cpp.
References DL, llvm::BasicBlock::end(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::BasicBlock::getTerminator(), and insertDeclare().
Referenced by fixupDebugInfoPostExtraction(), and insertDeclare().
DbgInstPtr DIBuilder::insertDeclare | ( | llvm::Value * | Storage, |
DILocalVariable * | VarInfo, | ||
DIExpression * | Expr, | ||
const DILocation * | DL, | ||
InsertPosition | InsertPt | ||
) |
Insert a new llvm.dbg.declare intrinsic call.
Storage | llvm::Value of the variable |
VarInfo | Variable's debug info descriptor. |
Expr | A complex location expression. |
DL | Debug info location. |
InsertPt | Location for the new intrinsic. |
Definition at line 1128 of file DIBuilder.cpp.
References assert(), llvm::DbgVariableRecord::createDVRDeclare(), DL, llvm::DILocalVariable::getScope(), and llvm::DILocalScope::getSubprogram().
DbgInstPtr DIBuilder::insertLabel | ( | DILabel * | LabelInfo, |
const DILocation * | DL, | ||
InsertPosition | InsertPt | ||
) |
Insert a new llvm.dbg.label intrinsic call.
LabelInfo | Label's debug info descriptor. |
DL | Debug info location. |
InsertBefore | Location for the new intrinsic. |
Definition at line 1180 of file DIBuilder.cpp.
References assert(), DL, llvm::InsertPosition::getBasicBlock(), llvm::DILabel::getScope(), llvm::DILocalScope::getSubprogram(), llvm::BasicBlock::insertDbgRecordBefore(), and llvm::InsertPosition::isValid().
void DIBuilder::replaceArrays | ( | DICompositeType *& | T, |
DINodeArray | Elements, | ||
DINodeArray | TParams = DINodeArray() |
||
) |
Replace arrays on a composite type.
If T
is resolved, but the arrays aren't – which can happen if T
has a self-reference – DIBuilder needs to track the array to resolve cycles.
Definition at line 1216 of file DIBuilder.cpp.
References N.
Referenced by buildFrameDebugInfo(), and solveDIType().
|
inline |
Replace a temporary node.
Call MDNode::replaceAllUsesWith() on N
, replacing it with Replacement
.
If Replacement
is the same as N.get()
, instead call MDNode::replaceWithUniqued(). In this case, the uniqued node could have a different address, so we return the final address.
Definition at line 1196 of file DIBuilder.h.
References N, and llvm::MDNode::replaceWithUniqued().
Referenced by finalize().
void DIBuilder::replaceVTableHolder | ( | DICompositeType *& | T, |
DIType * | VTableHolder | ||
) |
Replace the vtable holder in the given type.
If this creates a self reference, it may orphan some unresolved cycles in the operands of T
, so DIBuilder needs to track that.
Definition at line 1197 of file DIBuilder.cpp.
References N.
void DIBuilder::retainType | ( | DIScope * | T | ) |
Retain DIScope* in a module even if it is not referenced through debug info anchors.
Definition at line 761 of file DIBuilder.cpp.
References assert().