LLVM 22.0.0git
Debug Information

This file declares the C API endpoints for generating DWARF Debug Info. More...

Collaboration diagram for Debug Information:

Typedefs

typedef unsigned LLVMMetadataKind
typedef unsigned LLVMDWARFTypeEncoding
 An LLVM DWARF type encoding.

Enumerations

enum  LLVMDIFlags {
  LLVMDIFlagZero = 0 , LLVMDIFlagPrivate = 1 , LLVMDIFlagProtected = 2 , LLVMDIFlagPublic = 3 ,
  LLVMDIFlagFwdDecl = 1 << 2 , LLVMDIFlagAppleBlock = 1 << 3 , LLVMDIFlagReservedBit4 = 1 << 4 , LLVMDIFlagVirtual = 1 << 5 ,
  LLVMDIFlagArtificial = 1 << 6 , LLVMDIFlagExplicit = 1 << 7 , LLVMDIFlagPrototyped = 1 << 8 , LLVMDIFlagObjcClassComplete = 1 << 9 ,
  LLVMDIFlagObjectPointer = 1 << 10 , LLVMDIFlagVector = 1 << 11 , LLVMDIFlagStaticMember = 1 << 12 , LLVMDIFlagLValueReference = 1 << 13 ,
  LLVMDIFlagRValueReference = 1 << 14 , LLVMDIFlagReserved = 1 << 15 , LLVMDIFlagSingleInheritance = 1 << 16 , LLVMDIFlagMultipleInheritance = 2 << 16 ,
  LLVMDIFlagVirtualInheritance = 3 << 16 , LLVMDIFlagIntroducedVirtual = 1 << 18 , LLVMDIFlagBitField = 1 << 19 , LLVMDIFlagNoReturn = 1 << 20 ,
  LLVMDIFlagTypePassByValue = 1 << 22 , LLVMDIFlagTypePassByReference = 1 << 23 , LLVMDIFlagEnumClass = 1 << 24 , LLVMDIFlagFixedEnum = LLVMDIFlagEnumClass ,
  LLVMDIFlagThunk = 1 << 25 , LLVMDIFlagNonTrivial = 1 << 26 , LLVMDIFlagBigEndian = 1 << 27 , LLVMDIFlagLittleEndian = 1 << 28 ,
  LLVMDIFlagIndirectVirtualBase = (1 << 2) | (1 << 5) , LLVMDIFlagAccessibility , LLVMDIFlagPtrToMemberRep
}
 Debug info flags. More...
enum  LLVMDWARFSourceLanguage {
  LLVMDWARFSourceLanguageC89 , LLVMDWARFSourceLanguageC , LLVMDWARFSourceLanguageAda83 , LLVMDWARFSourceLanguageC_plus_plus ,
  LLVMDWARFSourceLanguageCobol74 , LLVMDWARFSourceLanguageCobol85 , LLVMDWARFSourceLanguageFortran77 , LLVMDWARFSourceLanguageFortran90 ,
  LLVMDWARFSourceLanguagePascal83 , LLVMDWARFSourceLanguageModula2 , LLVMDWARFSourceLanguageJava , LLVMDWARFSourceLanguageC99 ,
  LLVMDWARFSourceLanguageAda95 , LLVMDWARFSourceLanguageFortran95 , LLVMDWARFSourceLanguagePLI , LLVMDWARFSourceLanguageObjC ,
  LLVMDWARFSourceLanguageObjC_plus_plus , LLVMDWARFSourceLanguageUPC , LLVMDWARFSourceLanguageD , LLVMDWARFSourceLanguagePython ,
  LLVMDWARFSourceLanguageOpenCL , LLVMDWARFSourceLanguageGo , LLVMDWARFSourceLanguageModula3 , LLVMDWARFSourceLanguageHaskell ,
  LLVMDWARFSourceLanguageC_plus_plus_03 , LLVMDWARFSourceLanguageC_plus_plus_11 , LLVMDWARFSourceLanguageOCaml , LLVMDWARFSourceLanguageRust ,
  LLVMDWARFSourceLanguageC11 , LLVMDWARFSourceLanguageSwift , LLVMDWARFSourceLanguageJulia , LLVMDWARFSourceLanguageDylan ,
  LLVMDWARFSourceLanguageC_plus_plus_14 , LLVMDWARFSourceLanguageFortran03 , LLVMDWARFSourceLanguageFortran08 , LLVMDWARFSourceLanguageRenderScript ,
  LLVMDWARFSourceLanguageBLISS , LLVMDWARFSourceLanguageKotlin , LLVMDWARFSourceLanguageZig , LLVMDWARFSourceLanguageCrystal ,
  LLVMDWARFSourceLanguageC_plus_plus_17 , LLVMDWARFSourceLanguageC_plus_plus_20 , LLVMDWARFSourceLanguageC17 , LLVMDWARFSourceLanguageFortran18 ,
  LLVMDWARFSourceLanguageAda2005 , LLVMDWARFSourceLanguageAda2012 , LLVMDWARFSourceLanguageHIP , LLVMDWARFSourceLanguageAssembly ,
  LLVMDWARFSourceLanguageC_sharp , LLVMDWARFSourceLanguageMojo , LLVMDWARFSourceLanguageGLSL , LLVMDWARFSourceLanguageGLSL_ES ,
  LLVMDWARFSourceLanguageHLSL , LLVMDWARFSourceLanguageOpenCL_CPP , LLVMDWARFSourceLanguageCPP_for_OpenCL , LLVMDWARFSourceLanguageSYCL ,
  LLVMDWARFSourceLanguageRuby , LLVMDWARFSourceLanguageMove , LLVMDWARFSourceLanguageHylo , LLVMDWARFSourceLanguageMetal ,
  LLVMDWARFSourceLanguageMips_Assembler , LLVMDWARFSourceLanguageGOOGLE_RenderScript , LLVMDWARFSourceLanguageBORLAND_Delphi
}
 Source languages known by DWARF. More...
enum  LLVMDWARFEmissionKind { LLVMDWARFEmissionNone = 0 , LLVMDWARFEmissionFull , LLVMDWARFEmissionLineTablesOnly }
 The amount of debug information to emit. More...
enum  {
  LLVMMDStringMetadataKind , LLVMConstantAsMetadataMetadataKind , LLVMLocalAsMetadataMetadataKind , LLVMDistinctMDOperandPlaceholderMetadataKind ,
  LLVMMDTupleMetadataKind , LLVMDILocationMetadataKind , LLVMDIExpressionMetadataKind , LLVMDIGlobalVariableExpressionMetadataKind ,
  LLVMGenericDINodeMetadataKind , LLVMDISubrangeMetadataKind , LLVMDIEnumeratorMetadataKind , LLVMDIBasicTypeMetadataKind ,
  LLVMDIDerivedTypeMetadataKind , LLVMDICompositeTypeMetadataKind , LLVMDISubroutineTypeMetadataKind , LLVMDIFileMetadataKind ,
  LLVMDICompileUnitMetadataKind , LLVMDISubprogramMetadataKind , LLVMDILexicalBlockMetadataKind , LLVMDILexicalBlockFileMetadataKind ,
  LLVMDINamespaceMetadataKind , LLVMDIModuleMetadataKind , LLVMDITemplateTypeParameterMetadataKind , LLVMDITemplateValueParameterMetadataKind ,
  LLVMDIGlobalVariableMetadataKind , LLVMDILocalVariableMetadataKind , LLVMDILabelMetadataKind , LLVMDIObjCPropertyMetadataKind ,
  LLVMDIImportedEntityMetadataKind , LLVMDIMacroMetadataKind , LLVMDIMacroFileMetadataKind , LLVMDICommonBlockMetadataKind ,
  LLVMDIStringTypeMetadataKind , LLVMDIGenericSubrangeMetadataKind , LLVMDIArgListMetadataKind , LLVMDIAssignIDMetadataKind ,
  LLVMDISubrangeTypeMetadataKind , LLVMDIFixedPointTypeMetadataKind
}
 The kind of metadata nodes. More...
enum  LLVMDWARFMacinfoRecordType {
  LLVMDWARFMacinfoRecordTypeDefine = 0x01 , LLVMDWARFMacinfoRecordTypeMacro = 0x02 , LLVMDWARFMacinfoRecordTypeStartFile = 0x03 , LLVMDWARFMacinfoRecordTypeEndFile = 0x04 ,
  LLVMDWARFMacinfoRecordTypeVendorExt = 0xff
}
 Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro. More...

Functions

LLVM_C_ABI unsigned LLVMDebugMetadataVersion (void)
 The current debug metadata version number.
LLVM_C_ABI unsigned LLVMGetModuleDebugMetadataVersion (LLVMModuleRef Module)
 The version of debug metadata that's present in the provided Module.
LLVM_C_ABI LLVMBool LLVMStripModuleDebugInfo (LLVMModuleRef Module)
 Strip debug info in the module if it exists.
LLVM_C_ABI LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved (LLVMModuleRef M)
 Construct a builder for a module, and do not allow for unresolved nodes attached to the module.
LLVM_C_ABI LLVMDIBuilderRef LLVMCreateDIBuilder (LLVMModuleRef M)
 Construct a builder for a module and collect unresolved nodes attached to the module in order to resolve cycles during a call to LLVMDIBuilderFinalize.
LLVM_C_ABI void LLVMDisposeDIBuilder (LLVMDIBuilderRef Builder)
 Deallocates the DIBuilder and everything it owns.
LLVM_C_ABI void LLVMDIBuilderFinalize (LLVMDIBuilderRef Builder)
 Construct any deferred debug info descriptors.
LLVM_C_ABI void LLVMDIBuilderFinalizeSubprogram (LLVMDIBuilderRef Builder, LLVMMetadataRef Subprogram)
 Finalize a specific subprogram.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateCompileUnit (LLVMDIBuilderRef Builder, LLVMDWARFSourceLanguage Lang, LLVMMetadataRef FileRef, const char *Producer, size_t ProducerLen, LLVMBool isOptimized, const char *Flags, size_t FlagsLen, unsigned RuntimeVer, const char *SplitName, size_t SplitNameLen, LLVMDWARFEmissionKind Kind, unsigned DWOId, LLVMBool SplitDebugInlining, LLVMBool DebugInfoForProfiling, const char *SysRoot, size_t SysRootLen, const char *SDK, size_t SDKLen)
 A CompileUnit provides an anchor for all debugging information generated during this instance of compilation.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFile (LLVMDIBuilderRef Builder, const char *Filename, size_t FilenameLen, const char *Directory, size_t DirectoryLen)
 Create a file descriptor to hold debugging information for a file.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateModule (LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, const char *ConfigMacros, size_t ConfigMacrosLen, const char *IncludePath, size_t IncludePathLen, const char *APINotesFile, size_t APINotesFileLen)
 Creates a new descriptor for a module with the specified parent scope.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateNameSpace (LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, LLVMBool ExportSymbols)
 Creates a new descriptor for a namespace with the specified parent scope.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFunction (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *LinkageName, size_t LinkageNameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool IsLocalToUnit, LLVMBool IsDefinition, unsigned ScopeLine, LLVMDIFlags Flags, LLVMBool IsOptimized)
 Create a new descriptor for the specified subprogram.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned Column)
 Create a descriptor for a lexical block with the specified parent context.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Discriminator)
 Create a descriptor for a lexical block with a new file attached.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromNamespace (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef NS, LLVMMetadataRef File, unsigned Line)
 Create a descriptor for an imported namespace.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromAlias (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef ImportedEntity, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef *Elements, unsigned NumElements)
 Create a descriptor for an imported module that aliases another imported entity descriptor.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromModule (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef M, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef *Elements, unsigned NumElements)
 Create a descriptor for an imported module.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedDeclaration (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef Decl, LLVMMetadataRef File, unsigned Line, const char *Name, size_t NameLen, LLVMMetadataRef *Elements, unsigned NumElements)
 Create a descriptor for an imported function, type, or variable.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDebugLocation (LLVMContextRef Ctx, unsigned Line, unsigned Column, LLVMMetadataRef Scope, LLVMMetadataRef InlinedAt)
 Creates a new DebugLocation that describes a source location.
LLVM_C_ABI unsigned LLVMDILocationGetLine (LLVMMetadataRef Location)
 Get the line number of this debug location.
LLVM_C_ABI unsigned LLVMDILocationGetColumn (LLVMMetadataRef Location)
 Get the column number of this debug location.
LLVM_C_ABI LLVMMetadataRef LLVMDILocationGetScope (LLVMMetadataRef Location)
 Get the local scope associated with this debug location.
LLVM_C_ABI LLVMMetadataRef LLVMDILocationGetInlinedAt (LLVMMetadataRef Location)
 Get the "inline at" location associated with this debug location.
LLVM_C_ABI LLVMMetadataRef LLVMDIScopeGetFile (LLVMMetadataRef Scope)
 Get the metadata of the file associated with a given scope.
LLVM_C_ABI const charLLVMDIFileGetDirectory (LLVMMetadataRef File, unsigned *Len)
 Get the directory of a given file.
LLVM_C_ABI const charLLVMDIFileGetFilename (LLVMMetadataRef File, unsigned *Len)
 Get the name of a given file.
LLVM_C_ABI const charLLVMDIFileGetSource (LLVMMetadataRef File, unsigned *Len)
 Get the source of a given file.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray (LLVMDIBuilderRef Builder, LLVMMetadataRef *Data, size_t NumElements)
 Create a type array.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubroutineType (LLVMDIBuilderRef Builder, LLVMMetadataRef File, LLVMMetadataRef *ParameterTypes, unsigned NumParameterTypes, LLVMDIFlags Flags)
 Create subroutine type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMacro (LLVMDIBuilderRef Builder, LLVMMetadataRef ParentMacroFile, unsigned Line, LLVMDWARFMacinfoRecordType RecordType, const char *Name, size_t NameLen, const char *Value, size_t ValueLen)
 Create debugging information entry for a macro.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTempMacroFile (LLVMDIBuilderRef Builder, LLVMMetadataRef ParentMacroFile, unsigned Line, LLVMMetadataRef File)
 Create debugging information temporary entry for a macro file.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumerator (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, int64_t Value, LLVMBool IsUnsigned)
 Create debugging information entry for an enumerator.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, uint64_t SizeInBits, const uint64_t Words[], LLVMBool IsUnsigned)
 Create debugging information entry for an enumerator of arbitrary precision.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumerationType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef *Elements, unsigned NumElements, LLVMMetadataRef ClassTy)
 Create debugging information entry for an enumeration.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateUnionType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang, const char *UniqueId, size_t UniqueIdLen)
 Create debugging information entry for a union.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArrayType (LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned NumSubscripts)
 Create debugging information entry for an array.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSetType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef BaseTy)
 Create debugging information entry for a set.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubrangeType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef BaseTy, LLVMMetadataRef LowerBound, LLVMMetadataRef UpperBound, LLVMMetadataRef Stride, LLVMMetadataRef Bias)
 Create a descriptor for a subrange with dynamic bounds.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned LineNo, LLVMMetadataRef File, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned NumSubscripts, LLVMMetadataRef DataLocation, LLVMMetadataRef Associated, LLVMMetadataRef Allocated, LLVMMetadataRef Rank, LLVMMetadataRef BitStride)
 Create debugging information entry for a dynamic array.
LLVM_C_ABI void LLVMReplaceArrays (LLVMDIBuilderRef Builder, LLVMMetadataRef *T, LLVMMetadataRef *Elements, unsigned NumElements)
 Replace arrays.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateVectorType (LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned NumSubscripts)
 Create debugging information entry for a vector type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateUnspecifiedType (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen)
 Create a DWARF unspecified type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateBasicType (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, uint64_t SizeInBits, LLVMDWARFTypeEncoding Encoding, LLVMDIFlags Flags)
 Create debugging information entry for a basic type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreatePointerType (LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits, unsigned AddressSpace, const char *Name, size_t NameLen)
 Create debugging information entry for a pointer.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateStructType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang, LLVMMetadataRef VTableHolder, const char *UniqueId, size_t UniqueIdLen)
 Create debugging information entry for a struct.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMemberType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Ty)
 Create debugging information entry for a member.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateStaticMemberType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal, uint32_t AlignInBits)
 Create debugging information entry for a C++ static data member.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMemberPointerType (LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeType, LLVMMetadataRef ClassType, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags)
 Create debugging information entry for a pointer to member.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjCIVar (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Ty, LLVMMetadataRef PropertyNode)
 Create debugging information entry for Objective-C instance variable.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjCProperty (LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, const char *GetterName, size_t GetterNameLen, const char *SetterName, size_t SetterNameLen, unsigned PropertyAttributes, LLVMMetadataRef Ty)
 Create debugging information entry for Objective-C property.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType (LLVMDIBuilderRef Builder, LLVMMetadataRef Type, LLVMBool Implicit)
 Create a uniqued DIType* clone with FlagObjectPointer.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateQualifiedType (LLVMDIBuilderRef Builder, unsigned Tag, LLVMMetadataRef Type)
 Create debugging information entry for a qualified type, e.g.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateReferenceType (LLVMDIBuilderRef Builder, unsigned Tag, LLVMMetadataRef Type)
 Create debugging information entry for a c++ style reference or rvalue reference type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateNullPtrType (LLVMDIBuilderRef Builder)
 Create C++11 nullptr type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTypedef (LLVMDIBuilderRef Builder, LLVMMetadataRef Type, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Scope, uint32_t AlignInBits)
 Create debugging information entry for a typedef.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateInheritance (LLVMDIBuilderRef Builder, LLVMMetadataRef Ty, LLVMMetadataRef BaseTy, uint64_t BaseOffset, uint32_t VBPtrOffset, LLVMDIFlags Flags)
 Create debugging information entry to establish inheritance relationship between two types.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateForwardDecl (LLVMDIBuilderRef Builder, unsigned Tag, const char *Name, size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
 Create a permanent forward-declared type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType (LLVMDIBuilderRef Builder, unsigned Tag, const char *Name, size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
 Create a temporary forward-declared type.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateBitFieldMemberType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef Type)
 Create debugging information entry for a bit field member.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateClassType (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, unsigned NumElements, LLVMMetadataRef VTableHolder, LLVMMetadataRef TemplateParamsNode, const char *UniqueIdentifier, size_t UniqueIdentifierLen)
 Create debugging information entry for a class.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArtificialType (LLVMDIBuilderRef Builder, LLVMMetadataRef Type)
 Create a uniqued DIType* clone with FlagArtificial set.
LLVM_C_ABI const charLLVMDITypeGetName (LLVMMetadataRef DType, size_t *Length)
 Get the name of this DIType.
LLVM_C_ABI uint64_t LLVMDITypeGetSizeInBits (LLVMMetadataRef DType)
 Get the size of this DIType in bits.
LLVM_C_ABI uint64_t LLVMDITypeGetOffsetInBits (LLVMMetadataRef DType)
 Get the offset of this DIType in bits.
LLVM_C_ABI uint32_t LLVMDITypeGetAlignInBits (LLVMMetadataRef DType)
 Get the alignment of this DIType in bits.
LLVM_C_ABI unsigned LLVMDITypeGetLine (LLVMMetadataRef DType)
 Get the source line where this DIType is declared.
LLVM_C_ABI LLVMDIFlags LLVMDITypeGetFlags (LLVMMetadataRef DType)
 Get the flags associated with this DIType.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange (LLVMDIBuilderRef Builder, int64_t LowerBound, int64_t Count)
 Create a descriptor for a value range.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateArray (LLVMDIBuilderRef Builder, LLVMMetadataRef *Data, size_t NumElements)
 Create an array of DI Nodes.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateExpression (LLVMDIBuilderRef Builder, uint64_t *Addr, size_t Length)
 Create a new descriptor for the specified variable which has a complex address expression for its address.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateConstantValueExpression (LLVMDIBuilderRef Builder, uint64_t Value)
 Create a new descriptor for the specified variable that does not have an address, but does have a constant value.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, LLVMMetadataRef Expr, LLVMMetadataRef Decl, uint32_t AlignInBits)
 Create a new descriptor for the specified variable.
LLVM_C_ABI uint16_t LLVMGetDINodeTag (LLVMMetadataRef MD)
 Get the dwarf::Tag of a DINode.
LLVM_C_ABI LLVMMetadataRef LLVMDIGlobalVariableExpressionGetVariable (LLVMMetadataRef GVE)
 Retrieves the DIVariable associated with this global variable expression.
LLVM_C_ABI LLVMMetadataRef LLVMDIGlobalVariableExpressionGetExpression (LLVMMetadataRef GVE)
 Retrieves the DIExpression associated with this global variable expression.
LLVM_C_ABI LLVMMetadataRef LLVMDIVariableGetFile (LLVMMetadataRef Var)
 Get the metadata of the file associated with a given variable.
LLVM_C_ABI LLVMMetadataRef LLVMDIVariableGetScope (LLVMMetadataRef Var)
 Get the metadata of the scope associated with a given variable.
LLVM_C_ABI unsigned LLVMDIVariableGetLine (LLVMMetadataRef Var)
 Get the source line where this DIVariable is declared.
LLVM_C_ABI LLVMMetadataRef LLVMTemporaryMDNode (LLVMContextRef Ctx, LLVMMetadataRef *Data, size_t NumElements)
 Create a new temporary MDNode.
LLVM_C_ABI void LLVMDisposeTemporaryMDNode (LLVMMetadataRef TempNode)
 Deallocate a temporary node.
LLVM_C_ABI void LLVMMetadataReplaceAllUsesWith (LLVMMetadataRef TempTargetMetadata, LLVMMetadataRef Replacement)
 Replace all uses of temporary metadata.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, LLVMMetadataRef Decl, uint32_t AlignInBits)
 Create a new descriptor for the specified global variable that is temporary and meant to be RAUWed.
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore (LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr)
 Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordAtEnd (LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block)
 Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordBefore (LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr)
 Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordAtEnd (LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block)
 Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateAutoVariable (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags, uint32_t AlignInBits)
 Create a new descriptor for a local auto variable.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateParameterVariable (LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, unsigned ArgNo, LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags)
 Create a new descriptor for a function parameter variable.
LLVM_C_ABI LLVMMetadataRef LLVMGetSubprogram (LLVMValueRef Func)
 Get the metadata of the subprogram attached to a function.
LLVM_C_ABI void LLVMSetSubprogram (LLVMValueRef Func, LLVMMetadataRef SP)
 Set the subprogram attached to a function.
LLVM_C_ABI unsigned LLVMDISubprogramGetLine (LLVMMetadataRef Subprogram)
 Get the line associated with a given subprogram.
LLVM_C_ABI void LLVMDISubprogramReplaceType (LLVMMetadataRef Subprogram, LLVMMetadataRef SubroutineType)
 Replace the subprogram subroutine type.
LLVM_C_ABI LLVMMetadataRef LLVMInstructionGetDebugLoc (LLVMValueRef Inst)
 Get the debug location for the given instruction.
LLVM_C_ABI void LLVMInstructionSetDebugLoc (LLVMValueRef Inst, LLVMMetadataRef Loc)
 Set the debug location for the given instruction.
LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLabel (LLVMDIBuilderRef Builder, LLVMMetadataRef Context, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNo, LLVMBool AlwaysPreserve)
 Create a new descriptor for a label.
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertLabelBefore (LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo, LLVMMetadataRef Location, LLVMValueRef InsertBefore)
 Insert a new llvm.dbg.label intrinsic call.
LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertLabelAtEnd (LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo, LLVMMetadataRef Location, LLVMBasicBlockRef InsertAtEnd)
 Insert a new llvm.dbg.label intrinsic call.
LLVM_C_ABI LLVMMetadataKind LLVMGetMetadataKind (LLVMMetadataRef Metadata)
 Obtain the enumerated type of a Metadata instance.

Detailed Description

This file declares the C API endpoints for generating DWARF Debug Info.

Note: This interface is experimental. It is NOT stable, and may be changed without warning.

Typedef Documentation

◆ LLVMDWARFTypeEncoding

An LLVM DWARF type encoding.

Definition at line 209 of file DebugInfo.h.

◆ LLVMMetadataKind

Definition at line 204 of file DebugInfo.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The kind of metadata nodes.

Enumerator
LLVMMDStringMetadataKind 
LLVMConstantAsMetadataMetadataKind 
LLVMLocalAsMetadataMetadataKind 
LLVMDistinctMDOperandPlaceholderMetadataKind 
LLVMMDTupleMetadataKind 
LLVMDILocationMetadataKind 
LLVMDIExpressionMetadataKind 
LLVMDIGlobalVariableExpressionMetadataKind 
LLVMGenericDINodeMetadataKind 
LLVMDISubrangeMetadataKind 
LLVMDIEnumeratorMetadataKind 
LLVMDIBasicTypeMetadataKind 
LLVMDIDerivedTypeMetadataKind 
LLVMDICompositeTypeMetadataKind 
LLVMDISubroutineTypeMetadataKind 
LLVMDIFileMetadataKind 
LLVMDICompileUnitMetadataKind 
LLVMDISubprogramMetadataKind 
LLVMDILexicalBlockMetadataKind 
LLVMDILexicalBlockFileMetadataKind 
LLVMDINamespaceMetadataKind 
LLVMDIModuleMetadataKind 
LLVMDITemplateTypeParameterMetadataKind 
LLVMDITemplateValueParameterMetadataKind 
LLVMDIGlobalVariableMetadataKind 
LLVMDILocalVariableMetadataKind 
LLVMDILabelMetadataKind 
LLVMDIObjCPropertyMetadataKind 
LLVMDIImportedEntityMetadataKind 
LLVMDIMacroMetadataKind 
LLVMDIMacroFileMetadataKind 
LLVMDICommonBlockMetadataKind 
LLVMDIStringTypeMetadataKind 
LLVMDIGenericSubrangeMetadataKind 
LLVMDIArgListMetadataKind 
LLVMDIAssignIDMetadataKind 
LLVMDISubrangeTypeMetadataKind 
LLVMDIFixedPointTypeMetadataKind 

Definition at line 164 of file DebugInfo.h.

◆ LLVMDIFlags

Debug info flags.

Enumerator
LLVMDIFlagZero 
LLVMDIFlagPrivate 
LLVMDIFlagProtected 
LLVMDIFlagPublic 
LLVMDIFlagFwdDecl 
LLVMDIFlagAppleBlock 
LLVMDIFlagReservedBit4 
LLVMDIFlagVirtual 
LLVMDIFlagArtificial 
LLVMDIFlagExplicit 
LLVMDIFlagPrototyped 
LLVMDIFlagObjcClassComplete 
LLVMDIFlagObjectPointer 
LLVMDIFlagVector 
LLVMDIFlagStaticMember 
LLVMDIFlagLValueReference 
LLVMDIFlagRValueReference 
LLVMDIFlagReserved 
LLVMDIFlagSingleInheritance 
LLVMDIFlagMultipleInheritance 
LLVMDIFlagVirtualInheritance 
LLVMDIFlagIntroducedVirtual 
LLVMDIFlagBitField 
LLVMDIFlagNoReturn 
LLVMDIFlagTypePassByValue 
LLVMDIFlagTypePassByReference 
LLVMDIFlagEnumClass 
LLVMDIFlagFixedEnum 
LLVMDIFlagThunk 
LLVMDIFlagNonTrivial 
LLVMDIFlagBigEndian 
LLVMDIFlagLittleEndian 
LLVMDIFlagIndirectVirtualBase 
LLVMDIFlagAccessibility 
LLVMDIFlagPtrToMemberRep 

Definition at line 35 of file DebugInfo.h.

◆ LLVMDWARFEmissionKind

The amount of debug information to emit.

Enumerator
LLVMDWARFEmissionNone 
LLVMDWARFEmissionFull 
LLVMDWARFEmissionLineTablesOnly 

Definition at line 153 of file DebugInfo.h.

◆ LLVMDWARFMacinfoRecordType

Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro.

See also
llvm::dwarf::MacinfoRecordType
Note
Values are from DW_MACINFO_* constants in the DWARF specification.
Enumerator
LLVMDWARFMacinfoRecordTypeDefine 
LLVMDWARFMacinfoRecordTypeMacro 
LLVMDWARFMacinfoRecordTypeStartFile 
LLVMDWARFMacinfoRecordTypeEndFile 
LLVMDWARFMacinfoRecordTypeVendorExt 

Definition at line 216 of file DebugInfo.h.

◆ LLVMDWARFSourceLanguage

Source languages known by DWARF.

Enumerator
LLVMDWARFSourceLanguageC89 
LLVMDWARFSourceLanguageC 
LLVMDWARFSourceLanguageAda83 
LLVMDWARFSourceLanguageC_plus_plus 
LLVMDWARFSourceLanguageCobol74 
LLVMDWARFSourceLanguageCobol85 
LLVMDWARFSourceLanguageFortran77 
LLVMDWARFSourceLanguageFortran90 
LLVMDWARFSourceLanguagePascal83 
LLVMDWARFSourceLanguageModula2 
LLVMDWARFSourceLanguageJava 
LLVMDWARFSourceLanguageC99 
LLVMDWARFSourceLanguageAda95 
LLVMDWARFSourceLanguageFortran95 
LLVMDWARFSourceLanguagePLI 
LLVMDWARFSourceLanguageObjC 
LLVMDWARFSourceLanguageObjC_plus_plus 
LLVMDWARFSourceLanguageUPC 
LLVMDWARFSourceLanguageD 
LLVMDWARFSourceLanguagePython 
LLVMDWARFSourceLanguageOpenCL 
LLVMDWARFSourceLanguageGo 
LLVMDWARFSourceLanguageModula3 
LLVMDWARFSourceLanguageHaskell 
LLVMDWARFSourceLanguageC_plus_plus_03 
LLVMDWARFSourceLanguageC_plus_plus_11 
LLVMDWARFSourceLanguageOCaml 
LLVMDWARFSourceLanguageRust 
LLVMDWARFSourceLanguageC11 
LLVMDWARFSourceLanguageSwift 
LLVMDWARFSourceLanguageJulia 
LLVMDWARFSourceLanguageDylan 
LLVMDWARFSourceLanguageC_plus_plus_14 
LLVMDWARFSourceLanguageFortran03 
LLVMDWARFSourceLanguageFortran08 
LLVMDWARFSourceLanguageRenderScript 
LLVMDWARFSourceLanguageBLISS 
LLVMDWARFSourceLanguageKotlin 
LLVMDWARFSourceLanguageZig 
LLVMDWARFSourceLanguageCrystal 
LLVMDWARFSourceLanguageC_plus_plus_17 
LLVMDWARFSourceLanguageC_plus_plus_20 
LLVMDWARFSourceLanguageC17 
LLVMDWARFSourceLanguageFortran18 
LLVMDWARFSourceLanguageAda2005 
LLVMDWARFSourceLanguageAda2012 
LLVMDWARFSourceLanguageHIP 
LLVMDWARFSourceLanguageAssembly 
LLVMDWARFSourceLanguageC_sharp 
LLVMDWARFSourceLanguageMojo 
LLVMDWARFSourceLanguageGLSL 
LLVMDWARFSourceLanguageGLSL_ES 
LLVMDWARFSourceLanguageHLSL 
LLVMDWARFSourceLanguageOpenCL_CPP 
LLVMDWARFSourceLanguageCPP_for_OpenCL 
LLVMDWARFSourceLanguageSYCL 
LLVMDWARFSourceLanguageRuby 
LLVMDWARFSourceLanguageMove 
LLVMDWARFSourceLanguageHylo 
LLVMDWARFSourceLanguageMetal 
LLVMDWARFSourceLanguageMips_Assembler 
LLVMDWARFSourceLanguageGOOGLE_RenderScript 
LLVMDWARFSourceLanguageBORLAND_Delphi 

Definition at line 79 of file DebugInfo.h.

Function Documentation

◆ LLVMCreateDIBuilder()

LLVM_C_ABI LLVMDIBuilderRef LLVMCreateDIBuilder ( LLVMModuleRef M)

Construct a builder for a module and collect unresolved nodes attached to the module in order to resolve cycles during a call to LLVMDIBuilderFinalize.

Definition at line 1013 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMCreateDIBuilderDisallowUnresolved()

LLVM_C_ABI LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved ( LLVMModuleRef M)

Construct a builder for a module, and do not allow for unresolved nodes attached to the module.

Definition at line 1009 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDebugMetadataVersion()

LLVM_C_ABI unsigned LLVMDebugMetadataVersion ( void )

The current debug metadata version number.

Definition at line 1005 of file DebugInfo.cpp.

References llvm::DEBUG_METADATA_VERSION.

◆ LLVMDIBuilderCreateArrayType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArrayType ( LLVMDIBuilderRef Builder,
uint64_t Size,
uint32_t AlignInBits,
LLVMMetadataRef Ty,
LLVMMetadataRef * Subscripts,
unsigned NumSubscripts )

Create debugging information entry for an array.

Parameters
BuilderThe DIBuilder.
SizeArray size.
AlignInBitsAlignment.
TyElement type.
SubscriptsSubscripts.
NumSubscriptsNumber of subscripts.

Definition at line 1342 of file DebugInfo.cpp.

References Size, llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateArtificialType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateArtificialType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Type )

Create a uniqued DIType* clone with FlagArtificial set.

Parameters
BuilderThe DIBuilder.
TypeThe underlying type.

Definition at line 1574 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateAutoVariable()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateAutoVariable ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Ty,
LLVMBool AlwaysPreserve,
LLVMDIFlags Flags,
uint32_t AlignInBits )

Create a new descriptor for a local auto variable.

Parameters
BuilderThe DIBuilder.
ScopeThe local scope the variable is declared in.
NameVariable name.
NameLenLength of variable name.
FileFile where this variable is defined.
LineNoLine number.
TyMetadata describing the type of the variable.
AlwaysPreserveIf true, this descriptor will survive optimizations.
FlagsFlags.
AlignInBitsVariable alignment.

Definition at line 1770 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateBasicType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateBasicType ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen,
uint64_t SizeInBits,
LLVMDWARFTypeEncoding Encoding,
LLVMDIFlags Flags )

Create debugging information entry for a basic type.

Parameters
BuilderThe DIBuilder.
NameType name.
NameLenLength of type name.
SizeInBitsSize of the type.
EncodingDWARF encoding code, e.g. LLVMDWARFTypeEncoding_float.
FlagsFlags to encode optional attribute like endianity

Definition at line 1364 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateBitFieldMemberType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateBitFieldMemberType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint64_t OffsetInBits,
uint64_t StorageOffsetInBits,
LLVMDIFlags Flags,
LLVMMetadataRef Type )

Create debugging information entry for a bit field member.

Parameters
BuilderThe DIBuilder.
ScopeMember scope.
NameMember name.
NameLenLength of member name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
OffsetInBitsMember offset.
StorageOffsetInBitsMember storage offset.
FlagsFlags to encode member attribute.
TypeParent type.

Definition at line 1539 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateClassType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateClassType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint32_t AlignInBits,
uint64_t OffsetInBits,
LLVMDIFlags Flags,
LLVMMetadataRef DerivedFrom,
LLVMMetadataRef * Elements,
unsigned NumElements,
LLVMMetadataRef VTableHolder,
LLVMMetadataRef TemplateParamsNode,
const char * UniqueIdentifier,
size_t UniqueIdentifierLen )

Create debugging information entry for a class.

Parameters
ScopeScope in which this class is defined.
NameClass name.
NameLenThe length of the C string passed to Name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private.
DerivedFromDebug info of the base class of this type.
ElementsClass members.
NumElementsNumber of class elements.
VTableHolderDebug 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.
TemplateParamsNodeTemplate type parameters.
UniqueIdentifierA unique identifier for the type.
UniqueIdentifierLenLength of the unique identifier.

Definition at line 1554 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateCompileUnit()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateCompileUnit ( LLVMDIBuilderRef Builder,
LLVMDWARFSourceLanguage Lang,
LLVMMetadataRef FileRef,
const char * Producer,
size_t ProducerLen,
LLVMBool isOptimized,
const char * Flags,
size_t FlagsLen,
unsigned RuntimeVer,
const char * SplitName,
size_t SplitNameLen,
LLVMDWARFEmissionKind Kind,
unsigned DWOId,
LLVMBool SplitDebugInlining,
LLVMBool DebugInfoForProfiling,
const char * SysRoot,
size_t SysRootLen,
const char * SDK,
size_t SDKLen )

A CompileUnit provides an anchor for all debugging information generated during this instance of compilation.

Parameters
LangSource programming language, eg. LLVMDWARFSourceLanguageC99
FileRefFile info.
ProducerIdentify the producer of debugging information and code. Usually this is a compiler version string.
ProducerLenThe length of the C string passed to Producer.
isOptimizedA boolean flag which indicates whether optimization is enabled or not.
FlagsThis 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.
FlagsLenThe length of the C string passed to Flags.
RuntimeVerThis indicates runtime version for languages like Objective-C.
SplitNameThe name of the file that we'll split debug info out into.
SplitNameLenThe length of the C string passed to SplitName.
KindThe kind of debug information to generate.
DWOIdThe DWOId if this is a split skeleton compile unit.
SplitDebugInliningWhether to emit inline debug info.
DebugInfoForProfilingWhether to emit extra debug info for profile collection.
SysRootThe Clang system root (value of -isysroot).
SysRootLenThe length of the C string passed to SysRoot.
SDKThe SDK. On Darwin, the last component of the sysroot.
SDKLenThe length of the C string passed to SDK.

Definition at line 1038 of file DebugInfo.cpp.

References llvm::DICompileUnit::Default, map_from_llvmDWARFsourcelanguage(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateConstantValueExpression()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateConstantValueExpression ( LLVMDIBuilderRef Builder,
uint64_t Value )

Create a new descriptor for the specified variable that does not have an address, but does have a constant value.

Parameters
BuilderThe DIBuilder.
ValueThe constant value.

Definition at line 1635 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateDebugLocation()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDebugLocation ( LLVMContextRef Ctx,
unsigned Line,
unsigned Column,
LLVMMetadataRef Scope,
LLVMMetadataRef InlinedAt )

Creates a new DebugLocation that describes a source location.

Parameters
LineThe line in the source file.
ColumnThe column in the source file.
ScopeThe scope in which the location resides.
InlinedAtThe scope where this location was inlined, if at all. (optional).
Note
If the item to which this location is attached cannot be attributed to a source line, pass 0 for the line and column.

Definition at line 1172 of file DebugInfo.cpp.

References llvm::MDNode::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateDynamicArrayType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateDynamicArrayType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
unsigned LineNo,
LLVMMetadataRef File,
uint64_t Size,
uint32_t AlignInBits,
LLVMMetadataRef Ty,
LLVMMetadataRef * Subscripts,
unsigned NumSubscripts,
LLVMMetadataRef DataLocation,
LLVMMetadataRef Associated,
LLVMMetadataRef Allocated,
LLVMMetadataRef Rank,
LLVMMetadataRef BitStride )

Create debugging information entry for a dynamic array.

Parameters
BuilderThe DIBuilder.
SizeArray size.
AlignInBitsAlignment.
TyElement type.
SubscriptsSubscripts.
NumSubscriptsNumber of subscripts.
DataLocationDataLocation. (DIVariable, DIExpression or NULL)
AssociatedAssociated. (DIVariable, DIExpression or NULL)
AllocatedAllocated. (DIVariable, DIExpression or NULL)
RankRank. (DIVariable, DIExpression or NULL)
BitStrideBitStride.

Definition at line 1302 of file DebugInfo.cpp.

References Size, llvm::unwrap(), unwrapDI(), unwrapExprVar(), and llvm::wrap().

◆ LLVMDIBuilderCreateEnumerationType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumerationType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMMetadataRef * Elements,
unsigned NumElements,
LLVMMetadataRef ClassTy )

Create debugging information entry for an enumeration.

Parameters
BuilderThe DIBuilder.
ScopeScope in which this enumeration is defined.
NameEnumeration name.
NameLenLength of enumeration name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
ElementsEnumeration elements.
NumElementsNumber of enumeration elements.
ClassTyUnderlying type of a C++11/ObjC fixed enum.

Definition at line 1257 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateEnumerator()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumerator ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen,
int64_t Value,
LLVMBool IsUnsigned )

Create debugging information entry for an enumerator.

Parameters
BuilderThe DIBuilder.
NameEnumerator name.
NameLenLength of enumerator name.
ValueEnumerator value.
IsUnsignedTrue if the value is unsigned.

Definition at line 1240 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen,
uint64_t SizeInBits,
const uint64_t Words[],
LLVMBool IsUnsigned )

Create debugging information entry for an enumerator of arbitrary precision.

Parameters
BuilderThe DIBuilder.
NameEnumerator name.
NameLenLength of enumerator name.
SizeInBitsNumber of bits of the value.
WordsThe words that make up the value.
IsUnsignedTrue if the value is unsigned.

Definition at line 1248 of file DebugInfo.cpp.

References llvm::ArrayRef(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateExpression()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateExpression ( LLVMDIBuilderRef Builder,
uint64_t * Addr,
size_t Length )

Create a new descriptor for the specified variable which has a complex address expression for its address.

Parameters
BuilderThe DIBuilder.
AddrAn array of complex address operations.
LengthLength of the address operation array.

Definition at line 1628 of file DebugInfo.cpp.

References llvm::Length, llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateFile()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFile ( LLVMDIBuilderRef Builder,
const char * Filename,
size_t FilenameLen,
const char * Directory,
size_t DirectoryLen )

Create a file descriptor to hold debugging information for a file.

Parameters
BuilderThe DIBuilder.
FilenameFile name.
FilenameLenThe length of the C string passed to Filename.
DirectoryDirectory.
DirectoryLenThe length of the C string passed to Directory.

Definition at line 1059 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateForwardDecl()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateForwardDecl ( LLVMDIBuilderRef Builder,
unsigned Tag,
const char * Name,
size_t NameLen,
LLVMMetadataRef Scope,
LLVMMetadataRef File,
unsigned Line,
unsigned RuntimeLang,
uint64_t SizeInBits,
uint32_t AlignInBits,
const char * UniqueIdentifier,
size_t UniqueIdentifierLen )

Create a permanent forward-declared type.

Parameters
BuilderThe DIBuilder.
TagA unique tag for this type.
NameType name.
NameLenLength of type name.
ScopeType scope.
FileFile where this type is defined.
LineLine number where this type is defined.
RuntimeLangIndicates runtime version for languages like Objective-C.
SizeInBitsMember size.
AlignInBitsMember alignment.
UniqueIdentifierA unique identifier for the type.
UniqueIdentifierLenLength of the unique identifier.

Definition at line 1481 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateFunction()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFunction ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
const char * LinkageName,
size_t LinkageNameLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Ty,
LLVMBool IsLocalToUnit,
LLVMBool IsDefinition,
unsigned ScopeLine,
LLVMDIFlags Flags,
LLVMBool IsOptimized )

Create a new descriptor for the specified subprogram.

Parameters
BuilderThe DIBuilder.
ScopeFunction scope.
NameFunction name.
NameLenLength of enumeration name.
LinkageNameMangled function name.
LinkageNameLenLength of linkage name.
FileFile where this variable is defined.
LineNoLine number.
TyFunction type.
IsLocalToUnitTrue if this function is not externally visible.
IsDefinitionTrue if this is a function definition.
ScopeLineSet to the beginning of the scope this starts
FlagsE.g.: LLVMDIFlagLValueReference. These flags are used to emit dwarf attributes.
IsOptimizedTrue if optimization is ON.

Definition at line 1087 of file DebugInfo.cpp.

References llvm::LinkageName, map_from_llvmDIFlags(), pack_into_DISPFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateGlobalVariableExpression()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
const char * Linkage,
size_t LinkLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Ty,
LLVMBool LocalToUnit,
LLVMMetadataRef Expr,
LLVMMetadataRef Decl,
uint32_t AlignInBits )

Create a new descriptor for the specified variable.

Parameters
ScopeVariable scope.
NameName of the variable.
NameLenThe length of the C string passed to Name.
LinkageMangled name of the variable.
LinkLenThe length of the C string passed to Linkage.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type.
LocalToUnitBoolean flag indicate whether this variable is externally visible or not.
ExprThe location of the global relative to the attached GlobalVariable.
DeclReference to the corresponding declaration. variables.
AlignInBitsVariable alignment(or 0 if no alignment attr was specified)

Definition at line 1640 of file DebugInfo.cpp.

References Linkage, llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateImportedDeclaration()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedDeclaration ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef Decl,
LLVMMetadataRef File,
unsigned Line,
const char * Name,
size_t NameLen,
LLVMMetadataRef * Elements,
unsigned NumElements )

Create a descriptor for an imported function, type, or variable.

Suitable for e.g. FORTRAN-style USE declarations.

Parameters
BuilderThe DIBuilder.
ScopeThe scope this module is imported into.
DeclThe declaration (or definition) of a function, type, or variable.
FileFile where the declaration is located.
LineLine number of the declaration.
NameA name that uniquely identifies this imported declaration.
NameLenThe length of the C string passed to Name.
ElementsRenamed elements.
NumElementsNumber of renamed elements.

Definition at line 1158 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateImportedModuleFromAlias()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromAlias ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef ImportedEntity,
LLVMMetadataRef File,
unsigned Line,
LLVMMetadataRef * Elements,
unsigned NumElements )

Create a descriptor for an imported module that aliases another imported entity descriptor.

Parameters
BuilderThe DIBuilder.
ScopeThe scope this module is imported into
ImportedEntityPrevious imported entity to alias.
FileFile where the declaration is located.
LineLine number of the declaration.
ElementsRenamed elements.
NumElementsNumber of renamed elements.

Definition at line 1132 of file DebugInfo.cpp.

References createImportedModule(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateImportedModuleFromModule()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromModule ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef M,
LLVMMetadataRef File,
unsigned Line,
LLVMMetadataRef * Elements,
unsigned NumElements )

Create a descriptor for an imported module.

Parameters
BuilderThe DIBuilder.
ScopeThe scope this module is imported into
MThe module being imported here
FileFile where the declaration is located.
LineLine number of the declaration.
ElementsRenamed elements.
NumElementsNumber of renamed elements.

Definition at line 1145 of file DebugInfo.cpp.

References createImportedModule(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateImportedModuleFromNamespace()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromNamespace ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef NS,
LLVMMetadataRef File,
unsigned Line )

Create a descriptor for an imported namespace.

Suitable for e.g. C++ using declarations.

Parameters
BuilderThe DIBuilder.
ScopeThe scope this module is imported into
FileFile where the declaration is located.
LineLine number of the declaration.

Definition at line 1121 of file DebugInfo.cpp.

References createImportedModule(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateInheritance()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateInheritance ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Ty,
LLVMMetadataRef BaseTy,
uint64_t BaseOffset,
uint32_t VBPtrOffset,
LLVMDIFlags Flags )

Create debugging information entry to establish inheritance relationship between two types.

Parameters
BuilderThe DIBuilder.
TyOriginal type.
BaseTyBase type. Ty is inherits from base.
BaseOffsetBase offset.
VBPtrOffsetVirtual base pointer offset.
FlagsFlags to describe inheritance attribute, e.g. private

Definition at line 1471 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateLabel()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLabel ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Context,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMBool AlwaysPreserve )

Create a new descriptor for a label.

Parameters
BuilderThe DIBuilder.
ScopeThe scope to create the label in.
NameVariable name.
NameLenLength of variable name.
FileThe file to create the label in.
LineNoLine Number.
AlwaysPreservePreserve the label regardless of optimization.
See also
llvm::DIBuilder::createLabel()

Definition at line 1831 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateLexicalBlock()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef File,
unsigned Line,
unsigned Column )

Create a descriptor for a lexical block with the specified parent context.

Parameters
BuilderThe DIBuilder.
ScopeParent lexical block.
FileSource file.
LineThe line in the source file.
ColumnThe column in the source file.

Definition at line 1102 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateLexicalBlockFile()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
LLVMMetadataRef File,
unsigned Discriminator )

Create a descriptor for a lexical block with a new file attached.

Parameters
BuilderThe DIBuilder.
ScopeLexical block.
FileSource file.
DiscriminatorDWARF path discriminator value.

Definition at line 1111 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateMacro()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMacro ( LLVMDIBuilderRef Builder,
LLVMMetadataRef ParentMacroFile,
unsigned Line,
LLVMDWARFMacinfoRecordType RecordType,
const char * Name,
size_t NameLen,
const char * Value,
size_t ValueLen )

Create debugging information entry for a macro.

Parameters
BuilderThe DIBuilder.
ParentMacroFileMacro parent (could be NULL).
LineSource line number where the macro is defined.
RecordTypeDW_MACINFO_define or DW_MACINFO_undef.
NameMacro name.
NameLenMacro name length.
ValueMacro value.
ValueLenMacro value length.

Definition at line 1220 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateMemberPointerType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMemberPointerType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef PointeeType,
LLVMMetadataRef ClassType,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMDIFlags Flags )

Create debugging information entry for a pointer to member.

Parameters
BuilderThe DIBuilder.
PointeeTypeType pointed to by this pointer.
ClassTypeType for which this pointer points to members of.
SizeInBitsSize.
AlignInBitsAlignment.
FlagsFlags.

Definition at line 1526 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateMemberType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateMemberType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
uint64_t SizeInBits,
uint32_t AlignInBits,
uint64_t OffsetInBits,
LLVMDIFlags Flags,
LLVMMetadataRef Ty )

Create debugging information entry for a member.

Parameters
BuilderThe DIBuilder.
ScopeMember scope.
NameMember name.
NameLenLength of member name.
FileFile where this member is defined.
LineNoLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
TyParent type.

Definition at line 1398 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateModule()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateModule ( LLVMDIBuilderRef Builder,
LLVMMetadataRef ParentScope,
const char * Name,
size_t NameLen,
const char * ConfigMacros,
size_t ConfigMacrosLen,
const char * IncludePath,
size_t IncludePathLen,
const char * APINotesFile,
size_t APINotesFileLen )

Creates a new descriptor for a module with the specified parent scope.

Parameters
BuilderThe DIBuilder.
ParentScopeThe parent scope containing this module declaration.
NameModule name.
NameLenThe length of the C string passed to Name.
ConfigMacrosA space-separated shell-quoted list of -D macro definitions as they would appear on a command line.
ConfigMacrosLenThe length of the C string passed to ConfigMacros.
IncludePathThe path to the module map file.
IncludePathLenThe length of the C string passed to IncludePath.
APINotesFileThe path to an API notes file for the module.
APINotesFileLenThe length of the C string passed to APINotestFile.

Definition at line 1067 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateNameSpace()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateNameSpace ( LLVMDIBuilderRef Builder,
LLVMMetadataRef ParentScope,
const char * Name,
size_t NameLen,
LLVMBool ExportSymbols )

Creates a new descriptor for a namespace with the specified parent scope.

Parameters
BuilderThe DIBuilder.
ParentScopeThe parent scope containing this module declaration.
NameNameSpace name.
NameLenThe length of the C string passed to Name.
ExportSymbolsWhether or not the namespace exports symbols, e.g. this is true of C++ inline namespaces.

Definition at line 1079 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateNullPtrType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateNullPtrType ( LLVMDIBuilderRef Builder)

Create C++11 nullptr type.

Parameters
BuilderThe DIBuilder.

Definition at line 1521 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateObjCIVar()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjCIVar ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
uint64_t SizeInBits,
uint32_t AlignInBits,
uint64_t OffsetInBits,
LLVMDIFlags Flags,
LLVMMetadataRef Ty,
LLVMMetadataRef PropertyNode )

Create debugging information entry for Objective-C instance variable.

Parameters
BuilderThe DIBuilder.
NameMember name.
NameLenThe length of the C string passed to Name.
FileFile where this member is defined.
LineNoLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
OffsetInBitsMember offset.
FlagsFlags to encode member attribute, e.g. private
TyParent type.
PropertyNodeProperty associated with this ivar.

Definition at line 1426 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateObjCProperty()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjCProperty ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
const char * GetterName,
size_t GetterNameLen,
const char * SetterName,
size_t SetterNameLen,
unsigned PropertyAttributes,
LLVMMetadataRef Ty )

Create debugging information entry for Objective-C property.

Parameters
BuilderThe DIBuilder.
NameProperty name.
NameLenThe length of the C string passed to Name.
FileFile where this property is defined.
LineNoLine number.
GetterNameName of the Objective C property getter selector.
GetterNameLenThe length of the C string passed to GetterName.
SetterNameName of the Objective C property setter selector.
SetterNameLenThe length of the C string passed to SetterName.
PropertyAttributesObjective C property attributes.
TyType.

Definition at line 1440 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateObjectPointerType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Type,
LLVMBool Implicit )

Create a uniqued DIType* clone with FlagObjectPointer.

If Implicit is true, then also set FlagArtificial.

Parameters
BuilderThe DIBuilder.
TypeThe underlying type to which this pointer points.
ImplicitIndicates whether this pointer was implicitly generated (i.e., not spelled out in source).

Definition at line 1453 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateParameterVariable()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateParameterVariable ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
unsigned ArgNo,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Ty,
LLVMBool AlwaysPreserve,
LLVMDIFlags Flags )

Create a new descriptor for a function parameter variable.

Parameters
BuilderThe DIBuilder.
ScopeThe local scope the variable is declared in.
NameVariable name.
NameLenLength of variable name.
ArgNoUnique argument number for this variable; starts at 1.
FileFile where this variable is defined.
LineNoLine number.
TyMetadata describing the type of the variable.
AlwaysPreserveIf true, this descriptor will survive optimizations.
FlagsFlags.

Definition at line 1780 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreatePointerType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreatePointerType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef PointeeTy,
uint64_t SizeInBits,
uint32_t AlignInBits,
unsigned AddressSpace,
const char * Name,
size_t NameLen )

Create debugging information entry for a pointer.

Parameters
BuilderThe DIBuilder.
PointeeTyType pointed by this pointer.
SizeInBitsSize.
AlignInBitsAlignment. (optional, pass 0 to ignore)
AddressSpaceDWARF address space. (optional, pass 0 to ignore)
NamePointer type name. (optional)
NameLenLength of pointer type name. (optional)

Definition at line 1373 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateQualifiedType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateQualifiedType ( LLVMDIBuilderRef Builder,
unsigned Tag,
LLVMMetadataRef Type )

Create debugging information entry for a qualified type, e.g.

'const int'.

Parameters
BuilderThe DIBuilder.
TagTag identifying type, e.g. LLVMDWARFTypeQualifier_volatile_type
TypeBase Type.

Definition at line 1507 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateReferenceType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateReferenceType ( LLVMDIBuilderRef Builder,
unsigned Tag,
LLVMMetadataRef Type )

Create debugging information entry for a c++ style reference or rvalue reference type.

Parameters
BuilderThe DIBuilder.
TagTag identifying type,
TypeBase Type.

Definition at line 1514 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateReplaceableCompositeType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType ( LLVMDIBuilderRef Builder,
unsigned Tag,
const char * Name,
size_t NameLen,
LLVMMetadataRef Scope,
LLVMMetadataRef File,
unsigned Line,
unsigned RuntimeLang,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMDIFlags Flags,
const char * UniqueIdentifier,
size_t UniqueIdentifierLen )

Create a temporary forward-declared type.

Parameters
BuilderThe DIBuilder.
TagA unique tag for this type.
NameType name.
NameLenLength of type name.
ScopeType scope.
FileFile where this type is defined.
LineLine number where this type is defined.
RuntimeLangIndicates runtime version for languages like Objective-C.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags.
UniqueIdentifierA unique identifier for the type.
UniqueIdentifierLenLength of the unique identifier.

Definition at line 1493 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateSetType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSetType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMMetadataRef BaseTy )

Create debugging information entry for a set.

Parameters
BuilderThe DIBuilder.
ScopeThe scope in which the set is defined.
NameA name that uniquely identifies this set.
NameLenThe length of the C string passed to Name.
FileFile where the set is located.
LineLine number of the declaration.
SizeInBitsSet size.
AlignInBitsSet alignment.
BaseTyThe base type of the set.

Definition at line 1269 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateStaticMemberType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateStaticMemberType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
LLVMMetadataRef Type,
LLVMDIFlags Flags,
LLVMValueRef ConstantVal,
uint32_t AlignInBits )

Create debugging information entry for a C++ static data member.

Parameters
BuilderThe DIBuilder.
ScopeMember scope.
NameMember name.
NameLenLength of member name.
FileFile where this member is declared.
LineNumberLine number.
TypeType of the static member.
FlagsFlags to encode member attribute, e.g. private.
ConstantValConst initializer of the member.
AlignInBitsMember alignment.

Definition at line 1414 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateStructType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateStructType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMDIFlags Flags,
LLVMMetadataRef DerivedFrom,
LLVMMetadataRef * Elements,
unsigned NumElements,
unsigned RunTimeLang,
LLVMMetadataRef VTableHolder,
const char * UniqueId,
size_t UniqueIdLen )

Create debugging information entry for a struct.

Parameters
BuilderThe DIBuilder.
ScopeScope in which this struct is defined.
NameStruct name.
NameLenStruct name length.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags to encode member attribute, e.g. private
ElementsStruct elements.
NumElementsNumber of struct elements.
RunTimeLangOptional parameter, Objective-C runtime version.
VTableHolderThe object containing the vtable for the struct.
UniqueIdA unique identifier for the struct.
UniqueIdLenLength of the unique identifier for the struct.

Definition at line 1382 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateSubrangeType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubrangeType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
unsigned LineNo,
LLVMMetadataRef File,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMDIFlags Flags,
LLVMMetadataRef BaseTy,
LLVMMetadataRef LowerBound,
LLVMMetadataRef UpperBound,
LLVMMetadataRef Stride,
LLVMMetadataRef Bias )

Create a descriptor for a subrange with dynamic bounds.

Parameters
BuilderThe DIBuilder.
ScopeThe scope in which the subrange is defined.
NameA name that uniquely identifies this subrange.
NameLenThe length of the C string passed to Name.
LineNoLine number.
FileFile where the subrange is located.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags.
BaseTyThe base type of the subrange. eg integer or enumeration
LowerBoundLower bound of the subrange.
UpperBoundUpper bound of the subrange.
StrideStride of the subrange.
BiasBias of the subrange.

Definition at line 1278 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateSubroutineType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateSubroutineType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef File,
LLVMMetadataRef * ParameterTypes,
unsigned NumParameterTypes,
LLVMDIFlags Flags )

Create subroutine type.

Parameters
BuilderThe DIBuilder.
FileThe file in which the subroutine resides.
ParameterTypesAn array of subroutine parameter types. This includes return type at 0th index.
NumParameterTypesThe number of parameter types in ParameterTypes
FlagsE.g.: LLVMDIFlagLValueReference. These flags are used to emit dwarf attributes.

Definition at line 1617 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateTempGlobalVariableFwdDecl()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
const char * Linkage,
size_t LnkLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Ty,
LLVMBool LocalToUnit,
LLVMMetadataRef Decl,
uint32_t AlignInBits )

Create a new descriptor for the specified global variable that is temporary and meant to be RAUWed.

Parameters
ScopeVariable scope.
NameName of the variable.
NameLenThe length of the C string passed to Name.
LinkageMangled name of the variable.
LnkLenThe length of the C string passed to Linkage.
FileFile where this variable is defined.
LineNoLine number.
TyVariable Type.
LocalToUnitBoolean flag indicate whether this variable is externally visible or not.
DeclReference to the corresponding declaration.
AlignInBitsVariable alignment(or 0 if no alignment attr was specified)

Definition at line 1690 of file DebugInfo.cpp.

References Linkage, llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateTempMacroFile()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTempMacroFile ( LLVMDIBuilderRef Builder,
LLVMMetadataRef ParentMacroFile,
unsigned Line,
LLVMMetadataRef File )

Create debugging information temporary entry for a macro file.

List of macro node direct children will be calculated by DIBuilder, using the ParentMacroFile relationship.

Parameters
BuilderThe DIBuilder.
ParentMacroFileMacro parent (could be NULL).
LineSource line number where the macro file is included.
FileFile descriptor containing the name of the macro file.

Definition at line 1233 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateTypedef()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateTypedef ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Type,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNo,
LLVMMetadataRef Scope,
uint32_t AlignInBits )

Create debugging information entry for a typedef.

Parameters
BuilderThe DIBuilder.
TypeOriginal type.
NameTypedef name.
FileFile where this type is defined.
LineNoLine number.
ScopeThe surrounding context for the typedef.

Definition at line 1461 of file DebugInfo.cpp.

References llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateUnionType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateUnionType ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Scope,
const char * Name,
size_t NameLen,
LLVMMetadataRef File,
unsigned LineNumber,
uint64_t SizeInBits,
uint32_t AlignInBits,
LLVMDIFlags Flags,
LLVMMetadataRef * Elements,
unsigned NumElements,
unsigned RunTimeLang,
const char * UniqueId,
size_t UniqueIdLen )

Create debugging information entry for a union.

Parameters
BuilderThe DIBuilder.
ScopeScope in which this union is defined.
NameUnion name.
NameLenLength of union name.
FileFile where this member is defined.
LineNumberLine number.
SizeInBitsMember size.
AlignInBitsMember alignment.
FlagsFlags to encode member attribute, e.g. private
ElementsUnion elements.
NumElementsNumber of union elements.
RunTimeLangOptional parameter, Objective-C runtime version.
UniqueIdA unique identifier for the union.
UniqueIdLenLength of unique identifier.

Definition at line 1326 of file DebugInfo.cpp.

References map_from_llvmDIFlags(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderCreateUnspecifiedType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateUnspecifiedType ( LLVMDIBuilderRef Builder,
const char * Name,
size_t NameLen )

Create a DWARF unspecified type.

Parameters
BuilderThe DIBuilder.
NameThe unspecified type's name.
NameLenLength of type name.

Definition at line 1409 of file DebugInfo.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderCreateVectorType()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateVectorType ( LLVMDIBuilderRef Builder,
uint64_t Size,
uint32_t AlignInBits,
LLVMMetadataRef Ty,
LLVMMetadataRef * Subscripts,
unsigned NumSubscripts )

Create debugging information entry for a vector type.

Parameters
BuilderThe DIBuilder.
SizeVector size.
AlignInBitsAlignment.
TyElement type.
SubscriptsSubscripts.
NumSubscriptsNumber of subscripts.

Definition at line 1353 of file DebugInfo.cpp.

References Size, llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderFinalize()

LLVM_C_ABI void LLVMDIBuilderFinalize ( LLVMDIBuilderRef Builder)

Construct any deferred debug info descriptors.

Definition at line 1029 of file DebugInfo.cpp.

References llvm::unwrap().

◆ LLVMDIBuilderFinalizeSubprogram()

LLVM_C_ABI void LLVMDIBuilderFinalizeSubprogram ( LLVMDIBuilderRef Builder,
LLVMMetadataRef Subprogram )

Finalize a specific subprogram.

No new variables may be added to this subprogram afterwards.

Definition at line 1033 of file DebugInfo.cpp.

References llvm::unwrap(), and unwrapDI().

◆ LLVMDIBuilderGetOrCreateArray()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateArray ( LLVMDIBuilderRef Builder,
LLVMMetadataRef * Data,
size_t NumElements )

Create an array of DI Nodes.

Parameters
BuilderThe DIBuilder.
DataThe DI Node elements.
NumElementsNumber of DI Node elements.

Definition at line 1795 of file DebugInfo.cpp.

References llvm::Data, llvm::Attribute::get(), llvm::Length, llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderGetOrCreateSubrange()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange ( LLVMDIBuilderRef Builder,
int64_t LowerBound,
int64_t Count )

Create a descriptor for a value range.

Parameters
BuilderThe DIBuilder.
LowerBoundLower bound of the subrange, e.g. 0 for C, 1 for Fortran.
CountCount of elements in the subrange.

Definition at line 1790 of file DebugInfo.cpp.

References llvm::Count, llvm::Lo, llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderGetOrCreateTypeArray()

LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray ( LLVMDIBuilderRef Builder,
LLVMMetadataRef * Data,
size_t NumElements )

Create a type array.

Parameters
BuilderThe DIBuilder.
DataThe type elements.
NumElementsNumber of type elements.

Definition at line 1609 of file DebugInfo.cpp.

References llvm::Attribute::get(), llvm::Length, llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderInsertDbgValueRecordAtEnd()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordAtEnd ( LLVMDIBuilderRef Builder,
LLVMValueRef Val,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMBasicBlockRef Block )

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).

See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a new debug record at the end of the given basic block. If the basic block has a terminator instruction, the record is inserted before that terminator instruction.

Parameters
BuilderThe DIBuilder.
ValThe value of the variable.
VarInfoThe variable's debug info descriptor.
ExprA complex location expression for the variable.
DebugLocDebug info location.
BlockBasic block acting as a location for the new record.

Definition at line 1753 of file DebugInfo.cpp.

References assert(), llvm::Block, llvm::cast(), llvm::isa(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderInsertDbgValueRecordBefore()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordBefore ( LLVMDIBuilderRef Builder,
LLVMValueRef Val,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMValueRef Instr )

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).

See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a new debug record before the given instruction.

Parameters
BuilderThe DIBuilder.
ValThe value of the variable.
VarInfoThe variable's debug info descriptor.
ExprA complex location expression for the variable.
DebugLocDebug info location.
InstrInstruction acting as a location for the new record.

Definition at line 1735 of file DebugInfo.cpp.

References assert(), llvm::cast(), llvm::isa(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderInsertDeclareRecordAtEnd()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordAtEnd ( LLVMDIBuilderRef Builder,
LLVMValueRef Storage,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMBasicBlockRef Block )

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).

See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a Declare DbgRecord at the end of the given basic block. If the basic block has a terminator instruction, the record is inserted before that terminator instruction.

Parameters
BuilderThe DIBuilder.
StorageThe storage of the variable to declare.
VarInfoThe variable's debug info descriptor.
ExprA complex location expression for the variable.
DebugLocDebug info location.
BlockBasic block acting as a location for the new record.

Definition at line 1719 of file DebugInfo.cpp.

References assert(), llvm::Block, llvm::cast(), DL, llvm::isa(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderInsertDeclareRecordBefore()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore ( LLVMDIBuilderRef Builder,
LLVMValueRef Storage,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMValueRef Instr )

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true).

See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a Declare DbgRecord before the given instruction.

Parameters
BuilderThe DIBuilder.
StorageThe storage of the variable to declare.
VarInfoThe variable's debug info descriptor.
ExprA complex location expression for the variable.
DebugLocDebug info location.
InstrInstruction acting as a location for the new record.

Definition at line 1701 of file DebugInfo.cpp.

References assert(), llvm::cast(), DL, llvm::isa(), llvm::unwrap(), and llvm::wrap().

◆ LLVMDIBuilderInsertLabelAtEnd()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertLabelAtEnd ( LLVMDIBuilderRef Builder,
LLVMMetadataRef LabelInfo,
LLVMMetadataRef Location,
LLVMBasicBlockRef InsertAtEnd )

Insert a new llvm.dbg.label intrinsic call.

Parameters
BuilderThe DIBuilder.
LabelInfoThe Label's debug info descriptor
LocationThe debug info location
InsertAtEndLocation for the new intrinsic.
See also
llvm::DIBuilder::insertLabel()

Definition at line 1861 of file DebugInfo.cpp.

References assert(), llvm::cast(), llvm::isa(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIBuilderInsertLabelBefore()

LLVM_C_ABI LLVMDbgRecordRef LLVMDIBuilderInsertLabelBefore ( LLVMDIBuilderRef Builder,
LLVMMetadataRef LabelInfo,
LLVMMetadataRef Location,
LLVMValueRef InsertBefore )

Insert a new llvm.dbg.label intrinsic call.

Parameters
BuilderThe DIBuilder.
LabelInfoThe Label's debug info descriptor
LocationThe debug info location
InsertBeforeLocation for the new intrinsic.
See also
llvm::DIBuilder::insertLabel()

Definition at line 1842 of file DebugInfo.cpp.

References assert(), llvm::cast(), llvm::isa(), llvm::unwrap(), unwrapDI(), and llvm::wrap().

◆ LLVMDIFileGetDirectory()

LLVM_C_ABI const char * LLVMDIFileGetDirectory ( LLVMMetadataRef File,
unsigned * Len )

Get the directory of a given file.

Parameters
FileThe file object.
LenThe length of the returned string.
See also
DIFile::getDirectory()

Definition at line 1199 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDIFileGetFilename()

LLVM_C_ABI const char * LLVMDIFileGetFilename ( LLVMMetadataRef File,
unsigned * Len )

Get the name of a given file.

Parameters
FileThe file object.
LenThe length of the returned string.
See also
DIFile::getFilename()

Definition at line 1205 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDIFileGetSource()

LLVM_C_ABI const char * LLVMDIFileGetSource ( LLVMMetadataRef File,
unsigned * Len )

Get the source of a given file.

Parameters
FileThe file object.
LenThe length of the returned string.
See also
DIFile::getSource()

Definition at line 1211 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDIGlobalVariableExpressionGetExpression()

LLVM_C_ABI LLVMMetadataRef LLVMDIGlobalVariableExpressionGetExpression ( LLVMMetadataRef GVE)

Retrieves the DIExpression associated with this global variable expression.

Parameters
GVEThe global variable expression.
See also
llvm::DIGlobalVariableExpression::getExpression()

Definition at line 1656 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDIGlobalVariableExpressionGetVariable()

LLVM_C_ABI LLVMMetadataRef LLVMDIGlobalVariableExpressionGetVariable ( LLVMMetadataRef GVE)

Retrieves the DIVariable associated with this global variable expression.

Parameters
GVEThe global variable expression.
See also
llvm::DIGlobalVariableExpression::getVariable()

Definition at line 1652 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDILocationGetColumn()

LLVM_C_ABI unsigned LLVMDILocationGetColumn ( LLVMMetadataRef Location)

Get the column number of this debug location.

Parameters
LocationThe debug location.
See also
DILocation::getColumn()

Definition at line 1183 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDILocationGetInlinedAt()

LLVM_C_ABI LLVMMetadataRef LLVMDILocationGetInlinedAt ( LLVMMetadataRef Location)

Get the "inline at" location associated with this debug location.

Parameters
LocationThe debug location.
See also
DILocation::getInlinedAt()

Definition at line 1191 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDILocationGetLine()

LLVM_C_ABI unsigned LLVMDILocationGetLine ( LLVMMetadataRef Location)

Get the line number of this debug location.

Parameters
LocationThe debug location.
See also
DILocation::getLine()

Definition at line 1179 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDILocationGetScope()

LLVM_C_ABI LLVMMetadataRef LLVMDILocationGetScope ( LLVMMetadataRef Location)

Get the local scope associated with this debug location.

Parameters
LocationThe debug location.
See also
DILocation::getScope()

Definition at line 1187 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDIScopeGetFile()

LLVM_C_ABI LLVMMetadataRef LLVMDIScopeGetFile ( LLVMMetadataRef Scope)

Get the metadata of the file associated with a given scope.

Parameters
ScopeThe scope object.
See also
DIScope::getFile()

Definition at line 1195 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDisposeDIBuilder()

LLVM_C_ABI void LLVMDisposeDIBuilder ( LLVMDIBuilderRef Builder)

Deallocates the DIBuilder and everything it owns.

Note
You must call LLVMDIBuilderFinalize before this

Definition at line 1025 of file DebugInfo.cpp.

References llvm::unwrap().

◆ LLVMDisposeTemporaryMDNode()

LLVM_C_ABI void LLVMDisposeTemporaryMDNode ( LLVMMetadataRef TempNode)

Deallocate a temporary node.

Calls replaceAllUsesWith(nullptr) before deleting, so any remaining references will be reset.

Parameters
TempNodeThe temporary metadata node.

Definition at line 1679 of file DebugInfo.cpp.

References llvm::MDNode::deleteTemporary(), and unwrapDI().

◆ LLVMDISubprogramGetLine()

LLVM_C_ABI unsigned LLVMDISubprogramGetLine ( LLVMMetadataRef Subprogram)

Get the line associated with a given subprogram.

Parameters
SubprogramThe subprogram object.
See also
DISubprogram::getLine()

Definition at line 1810 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDISubprogramReplaceType()

LLVM_C_ABI void LLVMDISubprogramReplaceType ( LLVMMetadataRef Subprogram,
LLVMMetadataRef SubroutineType )

Replace the subprogram subroutine type.

Parameters
SubprogramThe subprogram object.
SubroutineTypeThe new subroutine type.
See also
DISubprogram::replaceType()

Definition at line 1814 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDITypeGetAlignInBits()

LLVM_C_ABI uint32_t LLVMDITypeGetAlignInBits ( LLVMMetadataRef DType)

Get the alignment of this DIType in bits.

Parameters
DTypeThe DIType.
See also
DIType::getAlignInBits()

Definition at line 1597 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDITypeGetFlags()

LLVM_C_ABI LLVMDIFlags LLVMDITypeGetFlags ( LLVMMetadataRef DType)

Get the flags associated with this DIType.

Parameters
DTypeThe DIType.
See also
DIType::getFlags()

Definition at line 1605 of file DebugInfo.cpp.

References getFlags(), map_to_llvmDIFlags(), and unwrapDI().

◆ LLVMDITypeGetLine()

LLVM_C_ABI unsigned LLVMDITypeGetLine ( LLVMMetadataRef DType)

Get the source line where this DIType is declared.

Parameters
DTypeThe DIType.
See also
DIType::getLine()

Definition at line 1601 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDITypeGetName()

LLVM_C_ABI const char * LLVMDITypeGetName ( LLVMMetadataRef DType,
size_t * Length )

Get the name of this DIType.

Parameters
DTypeThe DIType.
LengthThe length of the returned string.
See also
DIType::getName()

Definition at line 1583 of file DebugInfo.cpp.

References llvm::Length, and unwrapDI().

◆ LLVMDITypeGetOffsetInBits()

LLVM_C_ABI uint64_t LLVMDITypeGetOffsetInBits ( LLVMMetadataRef DType)

Get the offset of this DIType in bits.

Parameters
DTypeThe DIType.
See also
DIType::getOffsetInBits()

Definition at line 1593 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDITypeGetSizeInBits()

LLVM_C_ABI uint64_t LLVMDITypeGetSizeInBits ( LLVMMetadataRef DType)

Get the size of this DIType in bits.

Parameters
DTypeThe DIType.
See also
DIType::getSizeInBits()

Definition at line 1589 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDIVariableGetFile()

LLVM_C_ABI LLVMMetadataRef LLVMDIVariableGetFile ( LLVMMetadataRef Var)

Get the metadata of the file associated with a given variable.

Parameters
VarThe variable object.
See also
DIVariable::getFile()

Definition at line 1661 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMDIVariableGetLine()

LLVM_C_ABI unsigned LLVMDIVariableGetLine ( LLVMMetadataRef Var)

Get the source line where this DIVariable is declared.

Parameters
VarThe DIVariable.
See also
DIVariable::getLine()

Definition at line 1669 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMDIVariableGetScope()

LLVM_C_ABI LLVMMetadataRef LLVMDIVariableGetScope ( LLVMMetadataRef Var)

Get the metadata of the scope associated with a given variable.

Parameters
VarThe variable object.
See also
DIVariable::getScope()

Definition at line 1665 of file DebugInfo.cpp.

References unwrapDI(), and llvm::wrap().

◆ LLVMGetDINodeTag()

LLVM_C_ABI uint16_t LLVMGetDINodeTag ( LLVMMetadataRef MD)

Get the dwarf::Tag of a DINode.

Definition at line 1579 of file DebugInfo.cpp.

References unwrapDI().

◆ LLVMGetMetadataKind()

LLVM_C_ABI LLVMMetadataKind LLVMGetMetadataKind ( LLVMMetadataRef Metadata)

Obtain the enumerated type of a Metadata instance.

See also
llvm::Metadata::getMetadataID()

Definition at line 1878 of file DebugInfo.cpp.

References LLVMGenericDINodeMetadataKind, and llvm::unwrap().

◆ LLVMGetModuleDebugMetadataVersion()

LLVM_C_ABI unsigned LLVMGetModuleDebugMetadataVersion ( LLVMModuleRef Module)

The version of debug metadata that's present in the provided Module.

Definition at line 1017 of file DebugInfo.cpp.

References llvm::getDebugMetadataVersionFromModule(), and llvm::unwrap().

◆ LLVMGetSubprogram()

LLVM_C_ABI LLVMMetadataRef LLVMGetSubprogram ( LLVMValueRef Func)

Get the metadata of the subprogram attached to a function.

See also
llvm::Function::getSubprogram()

Definition at line 1802 of file DebugInfo.cpp.

References getSubprogram(), llvm::unwrap(), and llvm::wrap().

◆ LLVMInstructionGetDebugLoc()

LLVM_C_ABI LLVMMetadataRef LLVMInstructionGetDebugLoc ( LLVMValueRef Inst)

Get the debug location for the given instruction.

See also
llvm::Instruction::getDebugLoc()

Definition at line 1820 of file DebugInfo.cpp.

References getDebugLoc(), llvm::unwrap(), and llvm::wrap().

◆ LLVMInstructionSetDebugLoc()

LLVM_C_ABI void LLVMInstructionSetDebugLoc ( LLVMValueRef Inst,
LLVMMetadataRef Loc )

Set the debug location for the given instruction.

To clear the location metadata of the given instruction, pass NULL to Loc.

See also
llvm::Instruction::setDebugLoc()

Definition at line 1824 of file DebugInfo.cpp.

References llvm::dwarf_linker::DebugLoc, and llvm::unwrap().

◆ LLVMMetadataReplaceAllUsesWith()

LLVM_C_ABI void LLVMMetadataReplaceAllUsesWith ( LLVMMetadataRef TempTargetMetadata,
LLVMMetadataRef Replacement )

Replace all uses of temporary metadata.

Parameters
TempTargetMetadataThe temporary metadata node.
ReplacementThe replacement metadata node.

Definition at line 1683 of file DebugInfo.cpp.

References llvm::MDNode::deleteTemporary(), llvm::unwrap(), and unwrapDI().

◆ LLVMReplaceArrays()

LLVM_C_ABI void LLVMReplaceArrays ( LLVMDIBuilderRef Builder,
LLVMMetadataRef * T,
LLVMMetadataRef * Elements,
unsigned NumElements )

Replace arrays.

See also
DIBuilder::replaceArrays()

Definition at line 1318 of file DebugInfo.cpp.

References T, and llvm::unwrap().

◆ LLVMSetSubprogram()

LLVM_C_ABI void LLVMSetSubprogram ( LLVMValueRef Func,
LLVMMetadataRef SP )

Set the subprogram attached to a function.

See also
llvm::Function::setSubprogram()

Definition at line 1806 of file DebugInfo.cpp.

References llvm::unwrap().

◆ LLVMStripModuleDebugInfo()

LLVM_C_ABI LLVMBool LLVMStripModuleDebugInfo ( LLVMModuleRef Module)

Strip debug info in the module if it exists.

To do this, we remove all calls to the debugger intrinsics and any named metadata for debugging. We also remove debug locations for instructions. Return true if module is modified.

Definition at line 1021 of file DebugInfo.cpp.

References llvm::StripDebugInfo(), and llvm::unwrap().

◆ LLVMTemporaryMDNode()

LLVM_C_ABI LLVMMetadataRef LLVMTemporaryMDNode ( LLVMContextRef Ctx,
LLVMMetadataRef * Data,
size_t NumElements )

Create a new temporary MDNode.

Suitable for use in constructing cyclic MDNode structures. A temporary MDNode is not uniqued, may be RAUW'd, and must be manually deleted with LLVMDisposeTemporaryMDNode.

Parameters
CtxThe context in which to construct the temporary node.
DataThe metadata elements.
NumElementsNumber of metadata elements.

Definition at line 1673 of file DebugInfo.cpp.

References llvm::Count, llvm::Data, llvm::MDTuple::getTemporary(), llvm::unwrap(), and llvm::wrap().