2017-11-01 23:18:52 +01:00
|
|
|
//===------------ DebugInfo.h - LLVM C API Debug Info API -----------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
|
|
|
/// 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.
|
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-11-02 21:58:58 +01:00
|
|
|
#ifndef LLVM_C_DEBUGINFO_H
|
|
|
|
#define LLVM_C_DEBUGINFO_H
|
|
|
|
|
2017-11-01 23:18:52 +01:00
|
|
|
#include "llvm-c/Core.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Debug info flags.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
typedef enum {
|
|
|
|
LLVMDIFlagZero = 0,
|
|
|
|
LLVMDIFlagPrivate = 1,
|
|
|
|
LLVMDIFlagProtected = 2,
|
|
|
|
LLVMDIFlagPublic = 3,
|
|
|
|
LLVMDIFlagFwdDecl = 1 << 2,
|
|
|
|
LLVMDIFlagAppleBlock = 1 << 3,
|
|
|
|
LLVMDIFlagBlockByrefStruct = 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,
|
|
|
|
LLVMDIFlagMainSubprogram = 1 << 21,
|
2018-01-05 02:13:37 +01:00
|
|
|
LLVMDIFlagTypePassByValue = 1 << 22,
|
|
|
|
LLVMDIFlagTypePassByReference = 1 << 23,
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMDIFlagIndirectVirtualBase = (1 << 2) | (1 << 5),
|
|
|
|
LLVMDIFlagAccessibility = LLVMDIFlagPrivate | LLVMDIFlagProtected |
|
|
|
|
LLVMDIFlagPublic,
|
|
|
|
LLVMDIFlagPtrToMemberRep = LLVMDIFlagSingleInheritance |
|
|
|
|
LLVMDIFlagMultipleInheritance |
|
|
|
|
LLVMDIFlagVirtualInheritance
|
|
|
|
} LLVMDIFlags;
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Source languages known by DWARF.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
typedef enum {
|
|
|
|
LLVMDWARFSourceLanguageC89,
|
|
|
|
LLVMDWARFSourceLanguageC,
|
|
|
|
LLVMDWARFSourceLanguageAda83,
|
|
|
|
LLVMDWARFSourceLanguageC_plus_plus,
|
|
|
|
LLVMDWARFSourceLanguageCobol74,
|
|
|
|
LLVMDWARFSourceLanguageCobol85,
|
|
|
|
LLVMDWARFSourceLanguageFortran77,
|
|
|
|
LLVMDWARFSourceLanguageFortran90,
|
|
|
|
LLVMDWARFSourceLanguagePascal83,
|
|
|
|
LLVMDWARFSourceLanguageModula2,
|
|
|
|
// New in DWARF v3:
|
|
|
|
LLVMDWARFSourceLanguageJava,
|
|
|
|
LLVMDWARFSourceLanguageC99,
|
|
|
|
LLVMDWARFSourceLanguageAda95,
|
|
|
|
LLVMDWARFSourceLanguageFortran95,
|
|
|
|
LLVMDWARFSourceLanguagePLI,
|
|
|
|
LLVMDWARFSourceLanguageObjC,
|
|
|
|
LLVMDWARFSourceLanguageObjC_plus_plus,
|
|
|
|
LLVMDWARFSourceLanguageUPC,
|
|
|
|
LLVMDWARFSourceLanguageD,
|
|
|
|
// New in DWARF v4:
|
|
|
|
LLVMDWARFSourceLanguagePython,
|
|
|
|
// New in DWARF v5:
|
|
|
|
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,
|
|
|
|
// Vendor extensions:
|
|
|
|
LLVMDWARFSourceLanguageMips_Assembler,
|
|
|
|
LLVMDWARFSourceLanguageGOOGLE_RenderScript,
|
|
|
|
LLVMDWARFSourceLanguageBORLAND_Delphi
|
|
|
|
} LLVMDWARFSourceLanguage;
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* The amount of debug information to emit.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
typedef enum {
|
|
|
|
LLVMDWARFEmissionNone = 0,
|
|
|
|
LLVMDWARFEmissionFull,
|
|
|
|
LLVMDWARFEmissionLineTablesOnly
|
|
|
|
} LLVMDWARFEmissionKind;
|
|
|
|
|
2018-04-02 02:17:40 +02:00
|
|
|
/**
|
|
|
|
* An LLVM DWARF type encoding.
|
|
|
|
*/
|
|
|
|
typedef unsigned LLVMDWARFTypeEncoding;
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* The current debug metadata version number.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
unsigned LLVMDebugMetadataVersion(void);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* The version of debug metadata that's present in the provided \c Module.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
unsigned LLVMGetModuleDebugMetadataVersion(LLVMModuleRef Module);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMBool LLVMStripModuleDebugInfo(LLVMModuleRef Module);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Construct a builder for a module, and do not allow for unresolved nodes
|
|
|
|
* attached to the module.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved(LLVMModuleRef M);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Construct a builder for a module and collect unresolved nodes attached
|
|
|
|
* to the module in order to resolve cycles during a call to
|
|
|
|
* \c LLVMDIBuilderFinalize.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMDIBuilderRef LLVMCreateDIBuilder(LLVMModuleRef M);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
2017-11-04 21:31:20 +01:00
|
|
|
* Deallocates the \c DIBuilder and everything it owns.
|
2017-11-02 22:35:37 +01:00
|
|
|
* @note You must call \c LLVMDIBuilderFinalize before this
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
void LLVMDisposeDIBuilder(LLVMDIBuilderRef Builder);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Construct any deferred debug info descriptors.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
void LLVMDIBuilderFinalize(LLVMDIBuilderRef Builder);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* A CompileUnit provides an anchor for all debugging
|
|
|
|
* information generated during this instance of compilation.
|
|
|
|
* \param Lang Source programming language, eg.
|
|
|
|
* \c LLVMDWARFSourceLanguageC99
|
|
|
|
* \param FileRef File info.
|
|
|
|
* \param Producer Identify the producer of debugging information
|
|
|
|
* and code. Usually this is a compiler
|
|
|
|
* version string.
|
|
|
|
* \param ProducerLen The length of the C string passed to \c Producer.
|
|
|
|
* \param isOptimized A boolean flag which indicates whether optimization
|
|
|
|
* is enabled or not.
|
|
|
|
* \param Flags This string lists command line options. This
|
|
|
|
* string is directly embedded in debug info
|
|
|
|
* output which may be used by a tool
|
|
|
|
* analyzing generated debugging information.
|
|
|
|
* \param FlagsLen The length of the C string passed to \c Flags.
|
|
|
|
* \param RuntimeVer This indicates runtime version for languages like
|
|
|
|
* Objective-C.
|
|
|
|
* \param SplitName The name of the file that we'll split debug info
|
|
|
|
* out into.
|
|
|
|
* \param SplitNameLen The length of the C string passed to \c SplitName.
|
|
|
|
* \param Kind The kind of debug information to generate.
|
|
|
|
* \param DWOId The DWOId if this is a split skeleton compile unit.
|
|
|
|
* \param SplitDebugInlining Whether to emit inline debug info.
|
|
|
|
* \param DebugInfoForProfiling Whether to emit extra debug info for
|
|
|
|
* profile collection.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
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);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Create a file descriptor to hold debugging information for a file.
|
2017-11-04 21:31:20 +01:00
|
|
|
* \param Builder The \c DIBuilder.
|
2017-11-02 22:35:37 +01:00
|
|
|
* \param Filename File name.
|
|
|
|
* \param FilenameLen The length of the C string passed to \c Filename.
|
|
|
|
* \param Directory Directory.
|
|
|
|
* \param DirectoryLen The length of the C string passed to \c Directory.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename,
|
|
|
|
size_t FilenameLen, const char *Directory,
|
|
|
|
size_t DirectoryLen);
|
|
|
|
|
2018-04-23 15:51:43 +02:00
|
|
|
/**
|
|
|
|
* Creates a new descriptor for a module with the specified parent scope.
|
|
|
|
* \param Builder The \c DIBuilder.
|
|
|
|
* \param ParentScope The parent scope containing this module declaration.
|
|
|
|
* \param Name Module name.
|
|
|
|
* \param NameLen The length of the C string passed to \c Name.
|
|
|
|
* \param ConfigMacros A space-separated shell-quoted list of -D macro
|
|
|
|
definitions as they would appear on a command line.
|
|
|
|
* \param ConfigMacrosLen The length of the C string passed to \c ConfigMacros.
|
|
|
|
* \param IncludePath The path to the module map file.
|
|
|
|
* \param IncludePathLen The length of the C string passed to \c IncludePath.
|
|
|
|
* \param ISysRoot The Clang system root (value of -isysroot).
|
|
|
|
* \param ISysRootLen The length of the C string passed to \c ISysRoot.
|
|
|
|
*/
|
|
|
|
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 *ISysRoot, size_t ISysRootLen);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a new descriptor for a namespace with the specified parent scope.
|
|
|
|
* \param Builder The \c DIBuilder.
|
|
|
|
* \param ParentScope The parent scope containing this module declaration.
|
|
|
|
* \param Name NameSpace name.
|
|
|
|
* \param NameLen The length of the C string passed to \c Name.
|
|
|
|
* \param ExportSymbols Whether or not the namespace exports symbols, e.g.
|
|
|
|
* this is true of C++ inline namespaces.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateNameSpace(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef ParentScope,
|
|
|
|
const char *Name, size_t NameLen,
|
|
|
|
LLVMBool ExportSymbols);
|
|
|
|
|
2018-04-07 08:07:55 +02:00
|
|
|
/**
|
|
|
|
* Create a new descriptor for the specified subprogram.
|
|
|
|
* \param Builder The \c DIBuilder.
|
|
|
|
* \param Scope Function scope.
|
|
|
|
* \param Name Function name.
|
|
|
|
* \param NameLen Length of enumeration name.
|
|
|
|
* \param LinkageName Mangled function name.
|
|
|
|
* \param LinkageNameLen Length of linkage name.
|
|
|
|
* \param File File where this variable is defined.
|
|
|
|
* \param LineNo Line number.
|
|
|
|
* \param Ty Function type.
|
|
|
|
* \param IsLocalToUnit True if this function is not externally visible.
|
|
|
|
* \param IsDefinition True if this is a function definition.
|
|
|
|
* \param ScopeLine Set to the beginning of the scope this starts
|
|
|
|
* \param Flags E.g.: \c LLVMDIFlagLValueReference. These flags are
|
|
|
|
* used to emit dwarf attributes.
|
|
|
|
* \param IsOptimized True if optimization is ON.
|
|
|
|
*/
|
|
|
|
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 descriptor for a lexical block with the specified parent context.
|
|
|
|
* \param Builder The \c DIBuilder.
|
|
|
|
* \param Scope Parent lexical block.
|
|
|
|
* \param File Source file.
|
|
|
|
* \param Line The line in the source file.
|
|
|
|
* \param Column The column in the source file.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope,
|
|
|
|
LLVMMetadataRef File, unsigned Line, unsigned Column);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a descriptor for a lexical block with a new file attached.
|
|
|
|
* \param Builder The \c DIBuilder.
|
|
|
|
* \param Scope Lexical block.
|
|
|
|
* \param File Source file.
|
|
|
|
* \param Discriminator DWARF path discriminator value.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef Scope,
|
|
|
|
LLVMMetadataRef File,
|
|
|
|
unsigned Discriminator);
|
|
|
|
|
2017-11-02 22:35:37 +01:00
|
|
|
/**
|
|
|
|
* Creates a new DebugLocation that describes a source location.
|
|
|
|
* \param Line The line in the source file.
|
|
|
|
* \param Column The column in the source file.
|
|
|
|
* \param Scope The scope in which the location resides.
|
|
|
|
* \param InlinedAt The 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.
|
|
|
|
*/
|
2017-11-01 23:18:52 +01:00
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateDebugLocation(LLVMContextRef Ctx, unsigned Line,
|
|
|
|
unsigned Column, LLVMMetadataRef Scope,
|
|
|
|
LLVMMetadataRef InlinedAt);
|
|
|
|
|
2018-04-23 16:29:33 +02:00
|
|
|
/**
|
|
|
|
* Create a type array.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Data The type elements.
|
|
|
|
* \param NumElements Number of type elements.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef *Data,
|
|
|
|
size_t NumElements);
|
|
|
|
|
2018-04-02 02:17:40 +02:00
|
|
|
/**
|
|
|
|
* Create subroutine type.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param Builder The DIBuilder.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param File The file in which the subroutine resides.
|
|
|
|
* \param ParameterTypes An array of subroutine parameter types. This
|
|
|
|
* includes return type at 0th index.
|
|
|
|
* \param NumParameterTypes The number of parameter types in \c ParameterTypes
|
|
|
|
* \param Flags E.g.: \c LLVMDIFlagLValueReference.
|
|
|
|
* These flags are used to emit dwarf attributes.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef File,
|
|
|
|
LLVMMetadataRef *ParameterTypes,
|
|
|
|
unsigned NumParameterTypes,
|
|
|
|
LLVMDIFlags Flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for an enumeration.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Scope in which this enumeration is defined.
|
|
|
|
* \param Name Enumeration name.
|
|
|
|
* \param NameLen Length of enumeration name.
|
|
|
|
* \param File File where this member is defined.
|
|
|
|
* \param LineNumber Line number.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param Elements Enumeration elements.
|
|
|
|
* \param NumElements Number of enumeration elements.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param ClassTy Underlying type of a C++11/ObjC fixed enum.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
|
|
|
|
unsigned SizeInBits, unsigned AlignInBits, LLVMMetadataRef *Elements,
|
|
|
|
unsigned NumElements, LLVMMetadataRef ClassTy);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a union.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Scope in which this union is defined.
|
|
|
|
* \param Name Union name.
|
|
|
|
* \param NameLen Length of union name.
|
|
|
|
* \param File File where this member is defined.
|
|
|
|
* \param LineNumber Line number.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param Flags Flags to encode member attribute, e.g. private
|
|
|
|
* \param Elements Union elements.
|
|
|
|
* \param NumElements Number of union elements.
|
|
|
|
* \param RunTimeLang Optional parameter, Objective-C runtime version.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param UniqueId A unique identifier for the union.
|
|
|
|
* \param UniqueIdLen Length of unique identifier.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateUnionType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
|
|
|
|
unsigned SizeInBits, unsigned AlignInBits, LLVMDIFlags Flags,
|
|
|
|
LLVMMetadataRef *Elements, unsigned NumElements, unsigned RunTimeLang,
|
2018-04-02 12:21:51 +02:00
|
|
|
const char *UniqueId, size_t UniqueIdLen);
|
2018-04-02 02:17:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for an array.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Size Array size.
|
|
|
|
* \param AlignInBits Alignment.
|
|
|
|
* \param Ty Element type.
|
|
|
|
* \param Subscripts Subscripts.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NumSubscripts Number of subscripts.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef Builder, unsigned Size,
|
|
|
|
unsigned AlignInBits, LLVMMetadataRef Ty,
|
|
|
|
LLVMMetadataRef *Subscripts,
|
|
|
|
unsigned NumSubscripts);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a vector type.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Size Vector size.
|
|
|
|
* \param AlignInBits Alignment.
|
|
|
|
* \param Ty Element type.
|
|
|
|
* \param Subscripts Subscripts.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NumSubscripts Number of subscripts.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateVectorType(LLVMDIBuilderRef Builder, unsigned Size,
|
|
|
|
unsigned AlignInBits, LLVMMetadataRef Ty,
|
|
|
|
LLVMMetadataRef *Subscripts,
|
|
|
|
unsigned NumSubscripts);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a DWARF unspecified type.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Name The unspecified type's name.
|
|
|
|
* \param NameLen Length of type name.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateUnspecifiedType(LLVMDIBuilderRef Builder, const char *Name,
|
|
|
|
size_t NameLen);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a basic
|
|
|
|
* type.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Name Type name.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NameLen Length of type name.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param SizeInBits Size of the type.
|
|
|
|
* \param Encoding DWARF encoding code, e.g. \c LLVMDWARFTypeEncoding_float.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Builder, const char *Name,
|
|
|
|
size_t NameLen, unsigned SizeInBits,
|
|
|
|
LLVMDWARFTypeEncoding Encoding);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a pointer.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param PointeeTy Type pointed by this pointer.
|
|
|
|
* \param SizeInBits Size.
|
|
|
|
* \param AlignInBits Alignment. (optional, pass 0 to ignore)
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param AddressSpace DWARF address space. (optional, pass 0 to ignore)
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param Name Pointer type name. (optional)
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NameLen Length of pointer type name. (optional)
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreatePointerType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeTy,
|
|
|
|
unsigned SizeInBits, unsigned AlignInBits, unsigned AddressSpace,
|
|
|
|
const char *Name, size_t NameLen);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a struct.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Scope in which this struct is defined.
|
|
|
|
* \param Name Struct name.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NameLen Struct name length.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param File File where this member is defined.
|
|
|
|
* \param LineNumber Line number.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param Flags Flags to encode member attribute, e.g. private
|
|
|
|
* \param Elements Struct elements.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NumElements Number of struct elements.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param RunTimeLang Optional parameter, Objective-C runtime version.
|
|
|
|
* \param VTableHolder The object containing the vtable for the struct.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param UniqueId A unique identifier for the struct.
|
|
|
|
* \param UniqueIdLen Length of the unique identifier for the struct.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateStructType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
|
|
|
|
unsigned SizeInBits, unsigned 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 member.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Member scope.
|
|
|
|
* \param Name Member name.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NameLen Length of member name.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param File File where this member is defined.
|
|
|
|
* \param LineNo Line number.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param OffsetInBits Member offset.
|
|
|
|
* \param Flags Flags to encode member attribute, e.g. private
|
|
|
|
* \param Ty Parent type.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateMemberType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef File, unsigned LineNo,
|
|
|
|
unsigned SizeInBits, unsigned AlignInBits, unsigned OffsetInBits,
|
|
|
|
LLVMDIFlags Flags, LLVMMetadataRef Ty);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a
|
|
|
|
* C++ static data member.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Member scope.
|
|
|
|
* \param Name Member name.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NameLen Length of member name.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param File File where this member is declared.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param LineNumber Line number.
|
|
|
|
* \param Type Type of the static member.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param Flags Flags to encode member attribute, e.g. private.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param ConstantVal Const initializer of the member.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateStaticMemberType(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
|
|
|
|
LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal,
|
|
|
|
unsigned AlignInBits);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a pointer to member.
|
|
|
|
* \param Builder The DIBuilder.
|
2018-04-02 12:34:39 +02:00
|
|
|
* \param PointeeType Type pointed to by this pointer.
|
|
|
|
* \param ClassType Type for which this pointer points to members of.
|
|
|
|
* \param SizeInBits Size.
|
|
|
|
* \param AlignInBits Alignment.
|
|
|
|
* \param Flags Flags.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateMemberPointerType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef PointeeType,
|
|
|
|
LLVMMetadataRef ClassType,
|
|
|
|
unsigned SizeInBits,
|
|
|
|
unsigned AlignInBits,
|
|
|
|
LLVMDIFlags Flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new DIType* with the "object pointer"
|
|
|
|
* flag set.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Type The underlying type to which this pointer points.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef Type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a qualified
|
|
|
|
* type, e.g. 'const int'.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Tag Tag identifying type,
|
2018-04-02 02:17:40 +02:00
|
|
|
* e.g. LLVMDWARFTypeQualifier_volatile_type
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param Type Base Type.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateQualifiedType(LLVMDIBuilderRef Builder, unsigned Tag,
|
|
|
|
LLVMMetadataRef Type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a c++
|
|
|
|
* style reference or rvalue reference type.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Tag Tag identifying type,
|
|
|
|
* \param Type Base Type.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateReferenceType(LLVMDIBuilderRef Builder, unsigned Tag,
|
|
|
|
LLVMMetadataRef Type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create C++11 nullptr type.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateNullPtrType(LLVMDIBuilderRef Builder);
|
|
|
|
|
2018-04-23 15:51:43 +02:00
|
|
|
/**
|
|
|
|
* Create a permanent forward-declared type.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Tag A unique tag for this type.
|
|
|
|
* \param Name Type name.
|
|
|
|
* \param NameLen Length of type name.
|
|
|
|
* \param Scope Type scope.
|
|
|
|
* \param File File where this type is defined.
|
|
|
|
* \param Line Line number where this type is defined.
|
|
|
|
* \param RuntimeLang Indicates runtime version for languages like
|
|
|
|
* Objective-C.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param Flags Flags.
|
|
|
|
* \param UniqueIdentifier A unique identifier for the type.
|
|
|
|
* \param UniqueIdentifierLen Length of the unique identifier.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateForwardDecl(
|
|
|
|
LLVMDIBuilderRef Builder, unsigned Tag, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line,
|
|
|
|
unsigned RuntimeLang, unsigned SizeInBits, unsigned AlignInBits,
|
|
|
|
const char *UniqueIdentifier, size_t UniqueIdentifierLen);
|
|
|
|
|
2018-04-02 02:17:40 +02:00
|
|
|
/**
|
|
|
|
* Create a temporary forward-declared type.
|
2018-04-23 15:51:43 +02:00
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Tag A unique tag for this type.
|
|
|
|
* \param Name Type name.
|
|
|
|
* \param NameLen Length of type name.
|
|
|
|
* \param Scope Type scope.
|
|
|
|
* \param File File where this type is defined.
|
|
|
|
* \param Line Line number where this type is defined.
|
|
|
|
* \param RuntimeLang Indicates runtime version for languages like
|
|
|
|
* Objective-C.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param Flags Flags.
|
|
|
|
* \param UniqueIdentifier A unique identifier for the type.
|
|
|
|
* \param UniqueIdentifierLen Length of the unique identifier.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateReplaceableCompositeType(
|
|
|
|
LLVMDIBuilderRef Builder, unsigned Tag, const char *Name,
|
|
|
|
size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line,
|
|
|
|
unsigned RuntimeLang, unsigned SizeInBits, unsigned AlignInBits,
|
|
|
|
LLVMDIFlags Flags, const char *UniqueIdentifier,
|
|
|
|
size_t UniqueIdentifierLen);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a bit field member.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope Member scope.
|
|
|
|
* \param Name Member name.
|
|
|
|
* \param NameLen Length of member name.
|
|
|
|
* \param File File where this member is defined.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param LineNumber Line number.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param OffsetInBits Member offset.
|
|
|
|
* \param StorageOffsetInBits Member storage offset.
|
|
|
|
* \param Flags Flags to encode member attribute.
|
|
|
|
* \param Type Parent type.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateBitFieldMemberType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef Scope,
|
|
|
|
const char *Name, size_t NameLen,
|
|
|
|
LLVMMetadataRef File, unsigned LineNumber,
|
|
|
|
unsigned SizeInBits,
|
|
|
|
unsigned OffsetInBits,
|
|
|
|
unsigned StorageOffsetInBits,
|
|
|
|
LLVMDIFlags Flags, LLVMMetadataRef Type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create debugging information entry for a class.
|
|
|
|
* \param Scope Scope in which this class is defined.
|
|
|
|
* \param Name class name.
|
|
|
|
* \param File File where this member is defined.
|
|
|
|
* \param LineNumber Line number.
|
|
|
|
* \param SizeInBits Member size.
|
|
|
|
* \param AlignInBits Member alignment.
|
|
|
|
* \param OffsetInBits Member offset.
|
|
|
|
* \param Flags Flags to encode member attribute, e.g. private
|
|
|
|
* \param Elements class members.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param NumElements Number of class elements.
|
2018-04-02 02:17:40 +02:00
|
|
|
* \param DerivedFrom Debug info of the base class of this type.
|
2018-04-02 12:21:51 +02:00
|
|
|
* \param TemplateParamsNode Template type parameters.
|
2018-04-02 02:17:40 +02:00
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateClassType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef Scope, const char *Name, size_t NameLen,
|
|
|
|
LLVMMetadataRef File, unsigned LineNumber, unsigned SizeInBits,
|
|
|
|
unsigned AlignInBits, unsigned OffsetInBits, LLVMDIFlags Flags,
|
|
|
|
LLVMMetadataRef *Elements, unsigned NumElements,
|
|
|
|
LLVMMetadataRef DerivedFrom, LLVMMetadataRef TemplateParamsNode);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new DIType* with "artificial" flag set.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Type The underlying type.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef
|
|
|
|
LLVMDIBuilderCreateArtificialType(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef Type);
|
|
|
|
|
2018-04-23 16:29:33 +02:00
|
|
|
/**
|
|
|
|
* Create a descriptor for a value range.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param LowerBound Lower bound of the subrange, e.g. 0 for C, 1 for Fortran.
|
|
|
|
* \param Count Count of elements in the subrange.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef Builder,
|
|
|
|
int64_t LowerBound,
|
|
|
|
int64_t Count);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create an array of DI Nodes.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Data The DI Node elements.
|
|
|
|
* \param NumElements Number of DI Node elements.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Builder,
|
|
|
|
LLVMMetadataRef *Data,
|
|
|
|
size_t NumElements);
|
|
|
|
|
2018-04-22 21:24:44 +02:00
|
|
|
/**
|
|
|
|
* Create a new descriptor for the specified variable which has a complex
|
|
|
|
* address expression for its address.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Addr An array of complex address operations.
|
|
|
|
* \param Length Length of the address operation array.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder,
|
|
|
|
int64_t *Addr, size_t Length);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Insert a new llvm.dbg.declare intrinsic call before the given instruction.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Storage The storage of the variable to declare.
|
|
|
|
* \param VarInfo The variable's debug info descriptor.
|
|
|
|
* \param Expr A complex location expression for the variable.
|
|
|
|
* \param DebugLoc Debug info location.
|
|
|
|
* \param Instr Instruction acting as a location for the new intrinsic.
|
|
|
|
*/
|
|
|
|
LLVMValueRef LLVMDIBuilderInsertDeclareBefore(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
|
|
|
|
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Insert a new llvm.dbg.declare intrinsic call at the end of the given basic
|
|
|
|
* block. If the basic block has a terminator instruction, the intrinsic is
|
|
|
|
* inserted before that terminator instruction.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Storage The storage of the variable to declare.
|
|
|
|
* \param VarInfo The variable's debug info descriptor.
|
|
|
|
* \param Expr A complex location expression for the variable.
|
|
|
|
* \param DebugLoc Debug info location.
|
|
|
|
* \param Block Basic block acting as a location for the new intrinsic.
|
|
|
|
*/
|
|
|
|
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
|
|
|
|
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new descriptor for a local auto variable.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope The local scope the variable is declared in.
|
|
|
|
* \param Name Variable name.
|
|
|
|
* \param NameLen Length of variable name.
|
|
|
|
* \param File File where this variable is defined.
|
|
|
|
* \param LineNo Line number.
|
|
|
|
* \param Ty Metadata describing the type of the variable.
|
|
|
|
* \param AlwaysPreserve If true, this descriptor will survive optimizations.
|
|
|
|
* \param Flags Flags.
|
|
|
|
* \param AlignInBits Variable alignment.
|
|
|
|
*/
|
|
|
|
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 function parameter variable.
|
|
|
|
* \param Builder The DIBuilder.
|
|
|
|
* \param Scope The local scope the variable is declared in.
|
|
|
|
* \param Name Variable name.
|
|
|
|
* \param NameLen Length of variable name.
|
|
|
|
* \param ArgNo Unique argument number for this variable; starts at 1.
|
|
|
|
* \param File File where this variable is defined.
|
|
|
|
* \param LineNo Line number.
|
|
|
|
* \param Ty Metadata describing the type of the variable.
|
|
|
|
* \param AlwaysPreserve If true, this descriptor will survive optimizations.
|
|
|
|
* \param Flags Flags.
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
|
|
|
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
|
|
|
size_t NameLen, unsigned ArgNo, LLVMMetadataRef File, unsigned LineNo,
|
|
|
|
LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags);
|
|
|
|
|
2018-04-07 08:07:55 +02:00
|
|
|
/**
|
|
|
|
* Get the metadata of the subprogram attached to a function.
|
|
|
|
*
|
|
|
|
* @see llvm::Function::getSubprogram()
|
|
|
|
*/
|
|
|
|
LLVMMetadataRef LLVMGetSubprogram(LLVMValueRef Func);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the subprogram attached to a function.
|
|
|
|
*
|
|
|
|
* @see llvm::Function::setSubprogram()
|
|
|
|
*/
|
|
|
|
void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP);
|
|
|
|
|
2017-11-01 23:18:52 +01:00
|
|
|
#ifdef __cplusplus
|
2017-11-02 22:35:37 +01:00
|
|
|
} /* end extern "C" */
|
2017-11-01 23:18:52 +01:00
|
|
|
#endif
|
2017-11-02 21:58:58 +01:00
|
|
|
|
|
|
|
#endif
|