[llvm] [llvm-c] Add LLVMDWARFTypeEncoding enum and update the MacInfo and callconv enum (PR #84456)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 9 00:33:33 PST 2024
https://github.com/edg-l updated https://github.com/llvm/llvm-project/pull/84456
>From 2332898232ab2f1bf821b51c8828390b3da9c8ed Mon Sep 17 00:00:00 2001
From: Edgar Luque <git at edgarluque.com>
Date: Sat, 9 Mar 2024 09:31:54 +0100
Subject: [PATCH 1/2] [llvm-c] Format the LLVMCallConv enum
---
llvm/include/llvm-c/Core.h | 78 +++++++++++++++++++-------------------
1 file changed, 39 insertions(+), 39 deletions(-)
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 09746bdaf0c94e..4d3492de35aa13 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -211,47 +211,47 @@ typedef enum {
} LLVMDLLStorageClass;
typedef enum {
- LLVMCCallConv = 0,
- LLVMFastCallConv = 8,
- LLVMColdCallConv = 9,
- LLVMGHCCallConv = 10,
- LLVMHiPECallConv = 11,
- LLVMAnyRegCallConv = 13,
- LLVMPreserveMostCallConv = 14,
- LLVMPreserveAllCallConv = 15,
- LLVMSwiftCallConv = 16,
- LLVMCXXFASTTLSCallConv = 17,
- LLVMX86StdcallCallConv = 64,
- LLVMX86FastcallCallConv = 65,
- LLVMARMAPCSCallConv = 66,
- LLVMARMAAPCSCallConv = 67,
- LLVMARMAAPCSVFPCallConv = 68,
- LLVMMSP430INTRCallConv = 69,
- LLVMX86ThisCallCallConv = 70,
- LLVMPTXKernelCallConv = 71,
- LLVMPTXDeviceCallConv = 72,
- LLVMSPIRFUNCCallConv = 75,
- LLVMSPIRKERNELCallConv = 76,
- LLVMIntelOCLBICallConv = 77,
- LLVMX8664SysVCallConv = 78,
- LLVMWin64CallConv = 79,
+ LLVMCCallConv = 0,
+ LLVMFastCallConv = 8,
+ LLVMColdCallConv = 9,
+ LLVMGHCCallConv = 10,
+ LLVMHiPECallConv = 11,
+ LLVMAnyRegCallConv = 13,
+ LLVMPreserveMostCallConv = 14,
+ LLVMPreserveAllCallConv = 15,
+ LLVMSwiftCallConv = 16,
+ LLVMCXXFASTTLSCallConv = 17,
+ LLVMX86StdcallCallConv = 64,
+ LLVMX86FastcallCallConv = 65,
+ LLVMARMAPCSCallConv = 66,
+ LLVMARMAAPCSCallConv = 67,
+ LLVMARMAAPCSVFPCallConv = 68,
+ LLVMMSP430INTRCallConv = 69,
+ LLVMX86ThisCallCallConv = 70,
+ LLVMPTXKernelCallConv = 71,
+ LLVMPTXDeviceCallConv = 72,
+ LLVMSPIRFUNCCallConv = 75,
+ LLVMSPIRKERNELCallConv = 76,
+ LLVMIntelOCLBICallConv = 77,
+ LLVMX8664SysVCallConv = 78,
+ LLVMWin64CallConv = 79,
LLVMX86VectorCallCallConv = 80,
- LLVMHHVMCallConv = 81,
- LLVMHHVMCCallConv = 82,
- LLVMX86INTRCallConv = 83,
- LLVMAVRINTRCallConv = 84,
- LLVMAVRSIGNALCallConv = 85,
- LLVMAVRBUILTINCallConv = 86,
- LLVMAMDGPUVSCallConv = 87,
- LLVMAMDGPUGSCallConv = 88,
- LLVMAMDGPUPSCallConv = 89,
- LLVMAMDGPUCSCallConv = 90,
- LLVMAMDGPUKERNELCallConv = 91,
- LLVMX86RegCallCallConv = 92,
- LLVMAMDGPUHSCallConv = 93,
+ LLVMHHVMCallConv = 81,
+ LLVMHHVMCCallConv = 82,
+ LLVMX86INTRCallConv = 83,
+ LLVMAVRINTRCallConv = 84,
+ LLVMAVRSIGNALCallConv = 85,
+ LLVMAVRBUILTINCallConv = 86,
+ LLVMAMDGPUVSCallConv = 87,
+ LLVMAMDGPUGSCallConv = 88,
+ LLVMAMDGPUPSCallConv = 89,
+ LLVMAMDGPUCSCallConv = 90,
+ LLVMAMDGPUKERNELCallConv = 91,
+ LLVMX86RegCallCallConv = 92,
+ LLVMAMDGPUHSCallConv = 93,
LLVMMSP430BUILTINCallConv = 94,
- LLVMAMDGPULSCallConv = 95,
- LLVMAMDGPUESCallConv = 96
+ LLVMAMDGPULSCallConv = 95,
+ LLVMAMDGPUESCallConv = 96
} LLVMCallConv;
typedef enum {
>From e85a9f0c265ae9ba1272cfdbef9dd65436409949 Mon Sep 17 00:00:00 2001
From: Edgar Luque <git at edgarluque.com>
Date: Sat, 9 Mar 2024 09:33:10 +0100
Subject: [PATCH 2/2] [llvm-c] Add LLVMDWARFTypeEncoding enum, update
LLVMDWARFMacinfoRecordType and LLVMCallConv enums
---
llvm/include/llvm-c/Core.h | 556 +++++++++++++++-----------------
llvm/include/llvm-c/DebugInfo.h | 33 +-
2 files changed, 290 insertions(+), 299 deletions(-)
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 4d3492de35aa13..16703295d01fed 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -59,90 +59,90 @@ LLVM_C_EXTERN_C_BEGIN
/// to reorder them.
typedef enum {
/* Terminator Instructions */
- LLVMRet = 1,
- LLVMBr = 2,
- LLVMSwitch = 3,
- LLVMIndirectBr = 4,
- LLVMInvoke = 5,
+ LLVMRet = 1,
+ LLVMBr = 2,
+ LLVMSwitch = 3,
+ LLVMIndirectBr = 4,
+ LLVMInvoke = 5,
/* removed 6 due to API changes */
- LLVMUnreachable = 7,
- LLVMCallBr = 67,
+ LLVMUnreachable = 7,
+ LLVMCallBr = 67,
/* Standard Unary Operators */
- LLVMFNeg = 66,
+ LLVMFNeg = 66,
/* Standard Binary Operators */
- LLVMAdd = 8,
- LLVMFAdd = 9,
- LLVMSub = 10,
- LLVMFSub = 11,
- LLVMMul = 12,
- LLVMFMul = 13,
- LLVMUDiv = 14,
- LLVMSDiv = 15,
- LLVMFDiv = 16,
- LLVMURem = 17,
- LLVMSRem = 18,
- LLVMFRem = 19,
+ LLVMAdd = 8,
+ LLVMFAdd = 9,
+ LLVMSub = 10,
+ LLVMFSub = 11,
+ LLVMMul = 12,
+ LLVMFMul = 13,
+ LLVMUDiv = 14,
+ LLVMSDiv = 15,
+ LLVMFDiv = 16,
+ LLVMURem = 17,
+ LLVMSRem = 18,
+ LLVMFRem = 19,
/* Logical Operators */
- LLVMShl = 20,
- LLVMLShr = 21,
- LLVMAShr = 22,
- LLVMAnd = 23,
- LLVMOr = 24,
- LLVMXor = 25,
+ LLVMShl = 20,
+ LLVMLShr = 21,
+ LLVMAShr = 22,
+ LLVMAnd = 23,
+ LLVMOr = 24,
+ LLVMXor = 25,
/* Memory Operators */
- LLVMAlloca = 26,
- LLVMLoad = 27,
- LLVMStore = 28,
- LLVMGetElementPtr = 29,
+ LLVMAlloca = 26,
+ LLVMLoad = 27,
+ LLVMStore = 28,
+ LLVMGetElementPtr = 29,
/* Cast Operators */
- LLVMTrunc = 30,
- LLVMZExt = 31,
- LLVMSExt = 32,
- LLVMFPToUI = 33,
- LLVMFPToSI = 34,
- LLVMUIToFP = 35,
- LLVMSIToFP = 36,
- LLVMFPTrunc = 37,
- LLVMFPExt = 38,
- LLVMPtrToInt = 39,
- LLVMIntToPtr = 40,
- LLVMBitCast = 41,
- LLVMAddrSpaceCast = 60,
+ LLVMTrunc = 30,
+ LLVMZExt = 31,
+ LLVMSExt = 32,
+ LLVMFPToUI = 33,
+ LLVMFPToSI = 34,
+ LLVMUIToFP = 35,
+ LLVMSIToFP = 36,
+ LLVMFPTrunc = 37,
+ LLVMFPExt = 38,
+ LLVMPtrToInt = 39,
+ LLVMIntToPtr = 40,
+ LLVMBitCast = 41,
+ LLVMAddrSpaceCast = 60,
/* Other Operators */
- LLVMICmp = 42,
- LLVMFCmp = 43,
- LLVMPHI = 44,
- LLVMCall = 45,
- LLVMSelect = 46,
- LLVMUserOp1 = 47,
- LLVMUserOp2 = 48,
- LLVMVAArg = 49,
+ LLVMICmp = 42,
+ LLVMFCmp = 43,
+ LLVMPHI = 44,
+ LLVMCall = 45,
+ LLVMSelect = 46,
+ LLVMUserOp1 = 47,
+ LLVMUserOp2 = 48,
+ LLVMVAArg = 49,
LLVMExtractElement = 50,
- LLVMInsertElement = 51,
- LLVMShuffleVector = 52,
- LLVMExtractValue = 53,
- LLVMInsertValue = 54,
- LLVMFreeze = 68,
+ LLVMInsertElement = 51,
+ LLVMShuffleVector = 52,
+ LLVMExtractValue = 53,
+ LLVMInsertValue = 54,
+ LLVMFreeze = 68,
/* Atomic operators */
- LLVMFence = 55,
- LLVMAtomicCmpXchg = 56,
- LLVMAtomicRMW = 57,
+ LLVMFence = 55,
+ LLVMAtomicCmpXchg = 56,
+ LLVMAtomicRMW = 57,
/* Exception Handling Operators */
- LLVMResume = 58,
- LLVMLandingPad = 59,
- LLVMCleanupRet = 61,
- LLVMCatchRet = 62,
- LLVMCatchPad = 63,
- LLVMCleanupPad = 64,
- LLVMCatchSwitch = 65
+ LLVMResume = 58,
+ LLVMLandingPad = 59,
+ LLVMCleanupRet = 61,
+ LLVMCatchRet = 62,
+ LLVMCatchPad = 63,
+ LLVMCleanupPad = 64,
+ LLVMCatchSwitch = 65
} LLVMOpcode;
typedef enum {
@@ -164,31 +164,31 @@ typedef enum {
LLVMX86_MMXTypeKind, /**< X86 MMX */
LLVMTokenTypeKind, /**< Tokens */
LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */
- LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
- LLVMX86_AMXTypeKind, /**< X86 AMX */
- LLVMTargetExtTypeKind, /**< Target extension type */
+ LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
+ LLVMX86_AMXTypeKind, /**< X86 AMX */
+ LLVMTargetExtTypeKind, /**< Target extension type */
} LLVMTypeKind;
typedef enum {
- LLVMExternalLinkage, /**< Externally visible function */
+ LLVMExternalLinkage, /**< Externally visible function */
LLVMAvailableExternallyLinkage,
LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/
LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something
equivalent. */
LLVMLinkOnceODRAutoHideLinkage, /**< Obsolete */
- LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */
- LLVMWeakODRLinkage, /**< Same, but only replaced by something
- equivalent. */
- LLVMAppendingLinkage, /**< Special purpose, only applies to global arrays */
- LLVMInternalLinkage, /**< Rename collisions when linking (static
- functions) */
- LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */
- LLVMDLLImportLinkage, /**< Obsolete */
- LLVMDLLExportLinkage, /**< Obsolete */
- LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */
- LLVMGhostLinkage, /**< Obsolete */
- LLVMCommonLinkage, /**< Tentative definitions */
- LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */
+ LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */
+ LLVMWeakODRLinkage, /**< Same, but only replaced by something
+ equivalent. */
+ LLVMAppendingLinkage, /**< Special purpose, only applies to global arrays */
+ LLVMInternalLinkage, /**< Rename collisions when linking (static
+ functions) */
+ LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */
+ LLVMDLLImportLinkage, /**< Obsolete */
+ LLVMDLLExportLinkage, /**< Obsolete */
+ LLVMExternalWeakLinkage, /**< ExternalWeak linkage description */
+ LLVMGhostLinkage, /**< Obsolete */
+ LLVMCommonLinkage, /**< Tentative definitions */
+ LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */
LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */
} LLVMLinkage;
@@ -205,7 +205,7 @@ typedef enum {
} LLVMUnnamedAddr;
typedef enum {
- LLVMDefaultStorageClass = 0,
+ LLVMDefaultStorageClass = 0,
LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */
LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */
} LLVMDLLStorageClass;
@@ -251,7 +251,20 @@ typedef enum {
LLVMAMDGPUHSCallConv = 93,
LLVMMSP430BUILTINCallConv = 94,
LLVMAMDGPULSCallConv = 95,
- LLVMAMDGPUESCallConv = 96
+ LLVMAMDGPUESCallConv = 96,
+ LLVMAArch64VectorCall = 97,
+ LLVMAAArch64SVEVectorCall = 98,
+ LLVMWASMEmscriptenInvoke = 99,
+ LLVMAMDGPUGfx = 100,
+ LLVMM68kINTR = 101,
+ LLVMAArch64SMEABISupportRoutinesPreserveMostFromX0 = 102,
+ LLVMAArch64SMEABISupportRoutinesPreserveMostFromX2 = 103,
+ LLVMAMDGPUCSChain = 104,
+ LLVMAMDGPUCSChainPreserve = 105,
+ LLVMM68kRTD = 106,
+ LLVMGRAAL = 107,
+ LLVMARM64ECThunkX64 = 108,
+ LLVMARM64ECThunkNative = 109
} LLVMCallConv;
typedef enum {
@@ -321,8 +334,8 @@ typedef enum {
} LLVMRealPredicate;
typedef enum {
- LLVMLandingPadCatch, /**< A catch clause */
- LLVMLandingPadFilter /**< A filter clause */
+ LLVMLandingPadCatch, /**< A catch clause */
+ LLVMLandingPadFilter /**< A filter clause */
} LLVMLandingPadClauseTy;
typedef enum {
@@ -340,12 +353,12 @@ typedef enum {
LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the
operations affecting a specific address,
a consistent ordering exists */
- LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort
- necessary to acquire a lock to access other
- memory with normal loads and stores. */
- LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with
- a barrier of the sort necessary to release
- a lock. */
+ LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort
+ necessary to acquire a lock to access other
+ memory with normal loads and stores. */
+ LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with
+ a barrier of the sort necessary to release
+ a lock. */
LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a
Release barrier (for fences and
operations which both read and write
@@ -361,42 +374,42 @@ typedef enum {
} LLVMAtomicOrdering;
typedef enum {
- LLVMAtomicRMWBinOpXchg, /**< Set the new value and return the one old */
- LLVMAtomicRMWBinOpAdd, /**< Add a value and return the old one */
- LLVMAtomicRMWBinOpSub, /**< Subtract a value and return the old one */
- LLVMAtomicRMWBinOpAnd, /**< And a value and return the old one */
- LLVMAtomicRMWBinOpNand, /**< Not-And a value and return the old one */
- LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */
- LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */
- LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the
- original using a signed comparison and return
- the old one */
- LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the
- original using a signed comparison and return
- the old one */
- LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the
- original using an unsigned comparison and return
- the old one */
- LLVMAtomicRMWBinOpUMin, /**< Sets the value if it's greater than the
- original using an unsigned comparison and return
- the old one */
- LLVMAtomicRMWBinOpFAdd, /**< Add a floating point value and return the
- old one */
- LLVMAtomicRMWBinOpFSub, /**< Subtract a floating point value and return the
+ LLVMAtomicRMWBinOpXchg, /**< Set the new value and return the one old */
+ LLVMAtomicRMWBinOpAdd, /**< Add a value and return the old one */
+ LLVMAtomicRMWBinOpSub, /**< Subtract a value and return the old one */
+ LLVMAtomicRMWBinOpAnd, /**< And a value and return the old one */
+ LLVMAtomicRMWBinOpNand, /**< Not-And a value and return the old one */
+ LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */
+ LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */
+ LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the
+ original using a signed comparison and return
+ the old one */
+ LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the
+ original using a signed comparison and return
+ the old one */
+ LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the
+ original using an unsigned comparison and return
+ the old one */
+ LLVMAtomicRMWBinOpUMin, /**< Sets the value if it's greater than the
+ original using an unsigned comparison and return
+ the old one */
+ LLVMAtomicRMWBinOpFAdd, /**< Add a floating point value and return the
old one */
- LLVMAtomicRMWBinOpFMax, /**< Sets the value if it's greater than the
- original using an floating point comparison and
- return the old one */
- LLVMAtomicRMWBinOpFMin, /**< Sets the value if it's smaller than the
- original using an floating point comparison and
- return the old one */
+ LLVMAtomicRMWBinOpFSub, /**< Subtract a floating point value and return the
+ old one */
+ LLVMAtomicRMWBinOpFMax, /**< Sets the value if it's greater than the
+ original using an floating point comparison and
+ return the old one */
+ LLVMAtomicRMWBinOpFMin, /**< Sets the value if it's smaller than the
+ original using an floating point comparison and
+ return the old one */
} LLVMAtomicRMWBinOp;
typedef enum {
- LLVMDSError,
- LLVMDSWarning,
- LLVMDSRemark,
- LLVMDSNote
+ LLVMDSError,
+ LLVMDSWarning,
+ LLVMDSRemark,
+ LLVMDSNote
} LLVMDiagnosticSeverity;
typedef enum {
@@ -672,9 +685,9 @@ LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A);
/**
* Create a string attribute.
*/
-LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C,
- const char *K, unsigned KLength,
- const char *V, unsigned VLength);
+LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C, const char *K,
+ unsigned KLength, const char *V,
+ unsigned VLength);
/**
* Get the string attribute's kind.
@@ -863,8 +876,8 @@ LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry *Entries,
*
* @see Module::getModuleFlag()
*/
-LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M,
- const char *Key, size_t KeyLen);
+LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M, const char *Key,
+ size_t KeyLen);
/**
* Add a module-level flag to the module-level flags metadata if it doesn't
@@ -873,8 +886,7 @@ LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M,
* @see Module::addModuleFlag()
*/
void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior,
- const char *Key, size_t KeyLen,
- LLVMMetadataRef Val);
+ const char *Key, size_t KeyLen, LLVMMetadataRef Val);
/**
* Dump a representation of a module to stderr.
@@ -1024,8 +1036,8 @@ LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NamedMDNode);
*
* @see llvm::Module::getNamedMetadata()
*/
-LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M,
- const char *Name, size_t NameLen);
+LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M, const char *Name,
+ size_t NameLen);
/**
* Retrieve a NamedMDNode with the given name, creating a new node if no such
@@ -1033,9 +1045,8 @@ LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M,
*
* @see llvm::Module::getOrInsertNamedMetadata()
*/
-LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata(LLVMModuleRef M,
- const char *Name,
- size_t NameLen);
+LLVMNamedMDNodeRef
+LLVMGetOrInsertNamedMetadata(LLVMModuleRef M, const char *Name, size_t NameLen);
/**
* Retrieve the name of a NamedMDNode.
@@ -1341,9 +1352,8 @@ LLVMTypeRef LLVMPPCFP128Type(void);
* The function is defined as a tuple of a return Type, a list of
* parameter types, and whether the function is variadic.
*/
-LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType,
- LLVMTypeRef *ParamTypes, unsigned ParamCount,
- LLVMBool IsVarArg);
+LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes,
+ unsigned ParamCount, LLVMBool IsVarArg);
/**
* Returns whether a function type is variadic.
@@ -1705,95 +1715,47 @@ LLVMTypeRef LLVMTargetExtTypeInContext(LLVMContextRef C, const char *Name,
* @{
*/
-#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \
- macro(Argument) \
- macro(BasicBlock) \
- macro(InlineAsm) \
- macro(User) \
- macro(Constant) \
- macro(BlockAddress) \
- macro(ConstantAggregateZero) \
- macro(ConstantArray) \
- macro(ConstantDataSequential) \
- macro(ConstantDataArray) \
- macro(ConstantDataVector) \
- macro(ConstantExpr) \
- macro(ConstantFP) \
- macro(ConstantInt) \
- macro(ConstantPointerNull) \
- macro(ConstantStruct) \
- macro(ConstantTokenNone) \
- macro(ConstantVector) \
- macro(GlobalValue) \
- macro(GlobalAlias) \
- macro(GlobalObject) \
- macro(Function) \
- macro(GlobalVariable) \
- macro(GlobalIFunc) \
- macro(UndefValue) \
- macro(PoisonValue) \
- macro(Instruction) \
- macro(UnaryOperator) \
- macro(BinaryOperator) \
- macro(CallInst) \
- macro(IntrinsicInst) \
- macro(DbgInfoIntrinsic) \
- macro(DbgVariableIntrinsic) \
- macro(DbgDeclareInst) \
- macro(DbgLabelInst) \
- macro(MemIntrinsic) \
- macro(MemCpyInst) \
- macro(MemMoveInst) \
- macro(MemSetInst) \
- macro(CmpInst) \
- macro(FCmpInst) \
- macro(ICmpInst) \
- macro(ExtractElementInst) \
- macro(GetElementPtrInst) \
- macro(InsertElementInst) \
- macro(InsertValueInst) \
- macro(LandingPadInst) \
- macro(PHINode) \
- macro(SelectInst) \
- macro(ShuffleVectorInst) \
- macro(StoreInst) \
- macro(BranchInst) \
- macro(IndirectBrInst) \
- macro(InvokeInst) \
- macro(ReturnInst) \
- macro(SwitchInst) \
- macro(UnreachableInst) \
- macro(ResumeInst) \
- macro(CleanupReturnInst) \
- macro(CatchReturnInst) \
- macro(CatchSwitchInst) \
- macro(CallBrInst) \
- macro(FuncletPadInst) \
- macro(CatchPadInst) \
- macro(CleanupPadInst) \
- macro(UnaryInstruction) \
- macro(AllocaInst) \
- macro(CastInst) \
- macro(AddrSpaceCastInst) \
- macro(BitCastInst) \
- macro(FPExtInst) \
- macro(FPToSIInst) \
- macro(FPToUIInst) \
- macro(FPTruncInst) \
- macro(IntToPtrInst) \
- macro(PtrToIntInst) \
- macro(SExtInst) \
- macro(SIToFPInst) \
- macro(TruncInst) \
- macro(UIToFPInst) \
- macro(ZExtInst) \
- macro(ExtractValueInst) \
- macro(LoadInst) \
- macro(VAArgInst) \
- macro(FreezeInst) \
- macro(AtomicCmpXchgInst) \
- macro(AtomicRMWInst) \
- macro(FenceInst)
+#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \
+ macro(Argument) macro(BasicBlock) macro(InlineAsm) macro(User) macro(Constant) macro( \
+ BlockAddress) macro(ConstantAggregateZero) macro(ConstantArray) macro(ConstantDataSequential) \
+ macro(ConstantDataArray) macro(ConstantDataVector) macro(ConstantExpr) macro( \
+ ConstantFP) macro(ConstantInt) macro(ConstantPointerNull) macro(ConstantStruct) \
+ macro(ConstantTokenNone) macro(ConstantVector) macro(GlobalValue) macro( \
+ GlobalAlias) macro(GlobalObject) macro(Function) macro(GlobalVariable) \
+ macro(GlobalIFunc) macro(UndefValue) macro(PoisonValue) macro(Instruction) macro( \
+ UnaryOperator) macro(BinaryOperator) macro(CallInst) macro(IntrinsicInst) \
+ macro(DbgInfoIntrinsic) macro(DbgVariableIntrinsic) macro( \
+ DbgDeclareInst) macro(DbgLabelInst) macro(MemIntrinsic) \
+ macro(MemCpyInst) macro(MemMoveInst) macro(MemSetInst) macro( \
+ CmpInst) macro(FCmpInst) macro(ICmpInst) macro(ExtractElementInst) \
+ macro(GetElementPtrInst) macro(InsertElementInst) macro( \
+ InsertValueInst) macro(LandingPadInst) macro(PHINode) \
+ macro(SelectInst) macro(ShuffleVectorInst) macro( \
+ StoreInst) macro(BranchInst) macro(IndirectBrInst) \
+ macro(InvokeInst) macro(ReturnInst) macro( \
+ SwitchInst) macro(UnreachableInst) macro(ResumeInst) \
+ macro(CleanupReturnInst) macro(CatchReturnInst) macro( \
+ CatchSwitchInst) macro(CallBrInst) \
+ macro(FuncletPadInst) macro(CatchPadInst) macro( \
+ CleanupPadInst) macro(UnaryInstruction) \
+ macro(AllocaInst) macro(CastInst) macro( \
+ AddrSpaceCastInst) macro(BitCastInst) \
+ macro(FPExtInst) macro(FPToSIInst) macro( \
+ FPToUIInst) macro(FPTruncInst) \
+ macro(IntToPtrInst) macro( \
+ PtrToIntInst) macro(SExtInst) \
+ macro(SIToFPInst) macro( \
+ TruncInst) macro(UIToFPInst) \
+ macro(ZExtInst) macro( \
+ ExtractValueInst) macro(LoadInst) \
+ macro(VAArgInst) macro( \
+ FreezeInst) \
+ macro( \
+ AtomicCmpXchgInst) \
+ macro( \
+ AtomicRMWInst) \
+ macro( \
+ FenceInst)
/**
* @defgroup LLVMCCoreValueGeneral General APIs
@@ -1881,7 +1843,7 @@ LLVMBool LLVMIsPoison(LLVMValueRef Val);
*
* @see llvm::dyn_cast_or_null<>
*/
-#define LLVM_DECLARE_VALUE_CAST(name) \
+#define LLVM_DECLARE_VALUE_CAST(name) \
LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLARE_VALUE_CAST)
@@ -2168,7 +2130,8 @@ double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo);
* @see llvm::ConstantDataArray::getString()
*/
LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str,
- unsigned Length, LLVMBool DontNullTerminate);
+ unsigned Length,
+ LLVMBool DontNullTerminate);
/**
* Create a ConstantDataSequential with string content in the global context.
@@ -2223,8 +2186,8 @@ LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
* LLVMConstArray2
* @see llvm::ConstantArray::get()
*/
-LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy,
- LLVMValueRef *ConstantVals, unsigned Length);
+LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals,
+ unsigned Length);
/**
* Create a ConstantArray from values.
@@ -2240,8 +2203,7 @@ LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals,
* @see llvm::ConstantStruct::get()
*/
LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy,
- LLVMValueRef *ConstantVals,
- unsigned Count);
+ LLVMValueRef *ConstantVals, unsigned Count);
/**
* Get element of a constant aggregate (struct, array or vector) at the
@@ -2290,17 +2252,23 @@ LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal);
LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal);
LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal);
LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
LLVMValueRef LLVMConstMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
-LLVMValueRef LLVMConstICmp(LLVMIntPredicate Predicate,
- LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
+LLVMValueRef LLVMConstICmp(LLVMIntPredicate Predicate, LLVMValueRef LHSConstant,
+ LLVMValueRef RHSConstant);
LLVMValueRef LLVMConstFCmp(LLVMRealPredicate Predicate,
LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
LLVMValueRef LLVMConstShl(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant);
@@ -2313,11 +2281,11 @@ LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
-LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
+LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal,
+ LLVMTypeRef ToType);
LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal,
LLVMTypeRef ToType);
-LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal,
- LLVMTypeRef ToType);
+LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType);
LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant,
LLVMValueRef IndexConstant);
LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant,
@@ -2339,8 +2307,8 @@ LLVMValueRef LLVMGetBlockAddressFunction(LLVMValueRef BlockAddr);
LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock(LLVMValueRef BlockAddr);
/** Deprecated: Use LLVMGetInlineAsm instead. */
-LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty,
- const char *AsmString, const char *Constraints,
+LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString,
+ const char *Constraints,
LLVMBool HasSideEffects, LLVMBool IsAlignStack);
/**
@@ -2529,8 +2497,8 @@ LLVMValueRef LLVMAddAlias2(LLVMModuleRef M, LLVMTypeRef ValueTy,
*
* @see llvm::Module::getNamedAlias()
*/
-LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M,
- const char *Name, size_t NameLen);
+LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M, const char *Name,
+ size_t NameLen);
/**
* Obtain an iterator to the first GlobalAlias in a Module.
@@ -2635,8 +2603,7 @@ unsigned LLVMGetIntrinsicID(LLVMValueRef Fn);
*
* @see llvm::Intrinsic::getDeclaration()
*/
-LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
- unsigned ID,
+LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod, unsigned ID,
LLVMTypeRef *ParamTypes,
size_t ParamCount);
@@ -2856,10 +2823,9 @@ void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align);
*
* @see llvm::GlobalIFunc::create()
*/
-LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M,
- const char *Name, size_t NameLen,
- LLVMTypeRef Ty, unsigned AddrSpace,
- LLVMValueRef Resolver);
+LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M, const char *Name,
+ size_t NameLen, LLVMTypeRef Ty,
+ unsigned AddrSpace, LLVMValueRef Resolver);
/**
* Obtain a GlobalIFunc value from a Module by its name.
@@ -2868,8 +2834,8 @@ LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M,
*
* @see llvm::Module::getNamedIFunc()
*/
-LLVMValueRef LLVMGetNamedGlobalIFunc(LLVMModuleRef M,
- const char *Name, size_t NameLen);
+LLVMValueRef LLVMGetNamedGlobalIFunc(LLVMModuleRef M, const char *Name,
+ size_t NameLen);
/**
* Obtain an iterator to the first GlobalIFunc in a Module.
@@ -3228,8 +3194,7 @@ void LLVMInsertExistingBasicBlockAfterInsertBlock(LLVMBuilderRef Builder,
*
* @see llvm::Function::BasicBlockListType::push_back()
*/
-void LLVMAppendExistingBasicBlock(LLVMValueRef Fn,
- LLVMBasicBlockRef BB);
+void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlockRef BB);
/**
* Create a new basic block without inserting it into a function.
@@ -3876,8 +3841,8 @@ void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc);
* current debug location for the given builder. If the builder has no current
* debug location, this function is a no-op.
*
- * @deprecated LLVMSetInstDebugLocation is deprecated in favor of the more general
- * LLVMAddMetadataToInst.
+ * @deprecated LLVMSetInstDebugLocation is deprecated in favor of the more
+ * general LLVMAddMetadataToInst.
*
* @see llvm::IRBuilder::SetInstDebugLocation()
*/
@@ -4053,12 +4018,12 @@ LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
-LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
- const char *Name);
+LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS,
+ LLVMValueRef RHS, const char *Name);
LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
-LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
- const char *Name);
+LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS,
+ LLVMValueRef RHS, const char *Name);
LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
@@ -4068,7 +4033,7 @@ LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
- const char *Name);
+ const char *Name);
LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
@@ -4076,12 +4041,11 @@ LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
- const char *Name);
+ const char *Name);
LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
const char *Name);
-LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op,
- LLVMValueRef LHS, LLVMValueRef RHS,
- const char *Name);
+LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS,
+ LLVMValueRef RHS, const char *Name);
LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name);
LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V,
const char *Name);
@@ -4165,19 +4129,17 @@ LLVMValueRef LLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr,
*
* @see llvm::IRRBuilder::CreateMemCpy()
*/
-LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B,
- LLVMValueRef Dst, unsigned DstAlign,
- LLVMValueRef Src, unsigned SrcAlign,
- LLVMValueRef Size);
+LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst,
+ unsigned DstAlign, LLVMValueRef Src,
+ unsigned SrcAlign, LLVMValueRef Size);
/**
* Creates and inserts a memmove between the specified pointers.
*
* @see llvm::IRRBuilder::CreateMemMove()
*/
-LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B,
- LLVMValueRef Dst, unsigned DstAlign,
- LLVMValueRef Src, unsigned SrcAlign,
- LLVMValueRef Size);
+LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B, LLVMValueRef Dst,
+ unsigned DstAlign, LLVMValueRef Src,
+ unsigned SrcAlign, LLVMValueRef Size);
LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name);
LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty,
@@ -4204,17 +4166,19 @@ void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile);
LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst);
void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst);
-void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering);
+void LLVMSetOrdering(LLVMValueRef MemoryAccessInst,
+ LLVMAtomicOrdering Ordering);
LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst);
-void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp);
+void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst,
+ LLVMAtomicRMWBinOp BinOp);
/* Casts */
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val,
LLVMTypeRef DestTy, const char *Name);
-LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val,
- LLVMTypeRef DestTy, const char *Name);
-LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val,
- LLVMTypeRef DestTy, const char *Name);
+LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy,
+ const char *Name);
+LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy,
+ const char *Name);
LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val,
LLVMTypeRef DestTy, const char *Name);
LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val,
@@ -4276,9 +4240,8 @@ LLVMBuildCallWithOperandBundles(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn,
LLVMValueRef *Args, unsigned NumArgs,
LLVMOperandBundleRef *Bundles,
unsigned NumBundles, const char *Name);
-LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If,
- LLVMValueRef Then, LLVMValueRef Else,
- const char *Name);
+LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then,
+ LLVMValueRef Else, const char *Name);
LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty,
const char *Name);
LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal,
@@ -4378,18 +4341,15 @@ void LLVMDisposeModuleProvider(LLVMModuleProviderRef M);
* @{
*/
-LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path,
- LLVMMemoryBufferRef *OutMemBuf,
- char **OutMessage);
+LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(
+ const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf,
char **OutMessage);
-LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData,
- size_t InputDataLength,
- const char *BufferName,
- LLVMBool RequiresNullTerminator);
-LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData,
- size_t InputDataLength,
- const char *BufferName);
+LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(
+ const char *InputData, size_t InputDataLength, const char *BufferName,
+ LLVMBool RequiresNullTerminator);
+LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(
+ const char *InputData, size_t InputDataLength, const char *BufferName);
const char *LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf);
size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf);
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h
index 5924294708cc35..89706a88538d28 100644
--- a/llvm/include/llvm-c/DebugInfo.h
+++ b/llvm/include/llvm-c/DebugInfo.h
@@ -186,7 +186,30 @@ typedef unsigned LLVMMetadataKind;
/**
* An LLVM DWARF type encoding.
+ * @note Values are from DW_ATE_* constants in the DWARF specification.
*/
+enum {
+ LLVMDWARFTypeEncodingAddress = 0x1,
+ LLVMDWARFTypeEncodingBoolean = 0x2,
+ LLVMDWARFTypeEncodingComplexFloat = 0x3,
+ LLVMDWARFTypeEncodingFloat = 0x4,
+ LLVMDWARFTypeEncodingSigned = 0x5,
+ LLVMDWARFTypeEncodingSignedChar = 0x6,
+ LLVMDWARFTypeEncodingUnsigned = 0x7,
+ LLVMDWARFTypeEncodingUnsignedChar = 0x8,
+ LLVMDWARFTypeEncodingImaginaryFloat = 0x9,
+ LLVMDWARFTypeEncodingPackedDecimal = 0xa,
+ LLVMDWARFTypeEncodingNumericString = 0xb,
+ LLVMDWARFTypeEncodingEdited = 0xc,
+ LLVMDWARFTypeEncodingSignedFixed = 0xd,
+ LLVMDWARFTypeEncodingUnsignedFixed = 0xe,
+ LLVMDWARFTypeEncodingDecimalFloat = 0xf,
+ LLVMDWARFTypeEncodingUTF = 0x10,
+ LLVMDWARFTypeEncodingUCS = 0x11,
+ LLVMDWARFTypeEncodingASCII = 0x12,
+ LLVMDWARFTypeEncodingLoUser = 0x80,
+ LLVMDWARFTypeEncodingHiUser = 0xff,
+};
typedef unsigned LLVMDWARFTypeEncoding;
/**
@@ -199,7 +222,15 @@ typedef enum {
LLVMDWARFMacinfoRecordTypeMacro = 0x02,
LLVMDWARFMacinfoRecordTypeStartFile = 0x03,
LLVMDWARFMacinfoRecordTypeEndFile = 0x04,
- LLVMDWARFMacinfoRecordTypeVendorExt = 0xff
+ LLVMDWARFMacinfoRecordTypeDefineStrp = 0x05,
+ LLVMDWARFMacinfoRecordTypeUndefStrp = 0x06,
+ LLVMDWARFMacinfoRecordTypeImport = 0x07,
+ LLVMDWARFMacinfoRecordTypeDefineSup = 0x08,
+ LLVMDWARFMacinfoRecordTypeUndefSup = 0x09,
+ LLVMDWARFMacinfoRecordTypeImportSup = 0x0a,
+ LLVMDWARFMacinfoRecordTypeDefineStrx = 0x0b,
+ LLVMDWARFMacinfoRecordTypeUndefStrx = 0x0c,
+ LLVMDWARFMacinfoRecordTypeVendorExt = 0xff,
} LLVMDWARFMacinfoRecordType;
/**
More information about the llvm-commits
mailing list