Update to LLVM 20.1.0

This commit is contained in:
gingerBill
2025-03-18 15:39:18 +00:00
parent 0c70ec0330
commit d209af5094
34 changed files with 713 additions and 228 deletions
+115 -34
View File
@@ -16,8 +16,8 @@
#ifndef LLVM_C_DEBUGINFO_H
#define LLVM_C_DEBUGINFO_H
#include "ExternC.h"
#include "Types.h"
#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
LLVM_C_EXTERN_C_BEGIN
@@ -125,7 +125,21 @@ typedef enum {
LLVMDWARFSourceLanguageFortran18,
LLVMDWARFSourceLanguageAda2005,
LLVMDWARFSourceLanguageAda2012,
LLVMDWARFSourceLanguageHIP,
LLVMDWARFSourceLanguageAssembly,
LLVMDWARFSourceLanguageC_sharp,
LLVMDWARFSourceLanguageMojo,
LLVMDWARFSourceLanguageGLSL,
LLVMDWARFSourceLanguageGLSL_ES,
LLVMDWARFSourceLanguageHLSL,
LLVMDWARFSourceLanguageOpenCL_CPP,
LLVMDWARFSourceLanguageCPP_for_OpenCL,
LLVMDWARFSourceLanguageSYCL,
LLVMDWARFSourceLanguageRuby,
LLVMDWARFSourceLanguageMove,
LLVMDWARFSourceLanguageHylo,
LLVMDWARFSourceLanguageMetal,
// Vendor extensions:
LLVMDWARFSourceLanguageMips_Assembler,
LLVMDWARFSourceLanguageGOOGLE_RenderScript,
@@ -856,13 +870,16 @@ LLVMDIBuilderCreateObjCProperty(LLVMDIBuilderRef Builder,
LLVMMetadataRef Ty);
/**
* Create a uniqued DIType* clone with FlagObjectPointer and FlagArtificial set.
* Create a uniqued DIType* clone with FlagObjectPointer. If \c Implicit
* is true, then also set FlagArtificial.
* \param Builder The DIBuilder.
* \param Type The underlying type to which this pointer points.
* \param Implicit Indicates whether this pointer was implicitly generated
* (i.e., not spelled out in source).
*/
LLVMMetadataRef
LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type);
LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder,
LLVMMetadataRef Type,
LLVMBool Implicit);
/**
* Create debugging information entry for a qualified
@@ -1249,66 +1266,84 @@ LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl(
LLVMMetadataRef Decl, uint32_t AlignInBits);
/**
* Insert a new llvm.dbg.declare intrinsic call before the given instruction.
* 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.
* \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.
* \param Instr Instruction acting as a location for the new record.
*/
LLVMValueRef LLVMDIBuilderInsertDeclareBefore(
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordBefore(
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.
* 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.
* \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.
* \param Block Basic block acting as a location for the new record.
*/
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(
LLVMDbgRecordRef LLVMDIBuilderInsertDeclareRecordAtEnd(
LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
/**
* Insert a new llvm.dbg.value intrinsic call before the given instruction.
* 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.
* \param Builder The DIBuilder.
* \param Val The value of the variable.
* \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.
* \param Instr Instruction acting as a location for the new record.
*/
LLVMValueRef LLVMDIBuilderInsertDbgValueBefore(LLVMDIBuilderRef Builder,
LLVMValueRef Val,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMValueRef Instr);
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordBefore(
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMValueRef Instr);
/**
* Insert a new llvm.dbg.value 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.
* 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.
* \param Builder The DIBuilder.
* \param Val The value of the variable.
* \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.
* \param Block Basic block acting as a location for the new record.
*/
LLVMValueRef LLVMDIBuilderInsertDbgValueAtEnd(LLVMDIBuilderRef Builder,
LLVMValueRef Val,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMMetadataRef DebugLoc,
LLVMBasicBlockRef Block);
LLVMDbgRecordRef LLVMDIBuilderInsertDbgValueRecordAtEnd(
LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block);
/**
* Create a new descriptor for a local auto variable.
@@ -1384,6 +1419,52 @@ LLVMMetadataRef LLVMInstructionGetDebugLoc(LLVMValueRef Inst);
*/
void LLVMInstructionSetDebugLoc(LLVMValueRef Inst, LLVMMetadataRef Loc);
/**
* Create a new descriptor for a label
*
* \param Builder The DIBuilder.
* \param Scope The scope to create the label in.
* \param Name Variable name.
* \param NameLen Length of variable name.
* \param File The file to create the label in.
* \param LineNo Line Number.
* \param AlwaysPreserve Preserve the label regardless of optimization.
*
* @see llvm::DIBuilder::createLabel()
*/
LLVMMetadataRef LLVMDIBuilderCreateLabel(
LLVMDIBuilderRef Builder,
LLVMMetadataRef Context, const char *Name, size_t NameLen,
LLVMMetadataRef File, unsigned LineNo, LLVMBool AlwaysPreserve);
/**
* Insert a new llvm.dbg.label intrinsic call
*
* \param Builder The DIBuilder.
* \param LabelInfo The Label's debug info descriptor
* \param Location The debug info location
* \param InsertBefore Location for the new intrinsic.
*
* @see llvm::DIBuilder::insertLabel()
*/
LLVMDbgRecordRef LLVMDIBuilderInsertLabelBefore(
LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo,
LLVMMetadataRef Location, LLVMValueRef InsertBefore);
/**
* Insert a new llvm.dbg.label intrinsic call
*
* \param Builder The DIBuilder.
* \param LabelInfo The Label's debug info descriptor
* \param Location The debug info location
* \param InsertAtEnd Location for the new intrinsic.
*
* @see llvm::DIBuilder::insertLabel()
*/
LLVMDbgRecordRef LLVMDIBuilderInsertLabelAtEnd(
LLVMDIBuilderRef Builder, LLVMMetadataRef LabelInfo,
LLVMMetadataRef Location, LLVMBasicBlockRef InsertAtEnd);
/**
* Obtain the enumerated type of a Metadata instance.
*