-
-
Save mbs0221/2f8ac2488d7b886d8351a2559ce67a45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using static LowSharp; | |
namespace LLVM | |
{ | |
#region Enums | |
//LLVMVerifierFailureAction | |
public enum LLVMVerifierFailureAction : Int32 | |
{ | |
Abortprocessaction = 0, | |
Printmessageaction = 1, | |
Returnstatusaction = 2, | |
} | |
//LLVMComdatSelectionKind | |
public enum LLVMComdatSelectionKind : Int32 | |
{ | |
Anycomdatselectionkind = 0, | |
Exactmatchcomdatselectionkind = 1, | |
Largestcomdatselectionkind = 2, | |
Noduplicatescomdatselectionkind = 3, | |
Samesizecomdatselectionkind = 4, | |
} | |
//LLVMDiagnosticSeverity | |
public enum LLVMDiagnosticSeverity : Int32 | |
{ | |
Error = 0, | |
Warning = 1, | |
Remark = 2, | |
Note = 3, | |
} | |
//LLVMModuleFlagBehavior | |
public enum LLVMModuleFlagBehavior : Int32 | |
{ | |
Error = 0, | |
Warning = 1, | |
Require = 2, | |
Override = 3, | |
Append = 4, | |
Appendunique = 5, | |
} | |
//LLVMInlineAsmDialect | |
public enum LLVMInlineAsmDialect : Int32 | |
{ | |
Att = 0, | |
Intel = 1, | |
} | |
//LLVMTypeKind | |
public enum LLVMTypeKind : Int32 | |
{ | |
Voidtypekind = 0, | |
Halftypekind = 1, | |
Floattypekind = 2, | |
Doubletypekind = 3, | |
X86Fp80typekind = 4, | |
Fp128typekind = 5, | |
PpcFp128typekind = 6, | |
Labeltypekind = 7, | |
Integertypekind = 8, | |
Functiontypekind = 9, | |
Structtypekind = 10, | |
Arraytypekind = 11, | |
Pointertypekind = 12, | |
Vectortypekind = 13, | |
Metadatatypekind = 14, | |
X86Mmxtypekind = 15, | |
Tokentypekind = 16, | |
} | |
//LLVMValueKind | |
public enum LLVMValueKind : Int32 | |
{ | |
Argumentvaluekind = 0, | |
Basicblockvaluekind = 1, | |
Memoryusevaluekind = 2, | |
Memorydefvaluekind = 3, | |
Memoryphivaluekind = 4, | |
Functionvaluekind = 5, | |
Globalaliasvaluekind = 6, | |
Globalifuncvaluekind = 7, | |
Globalvariablevaluekind = 8, | |
Blockaddressvaluekind = 9, | |
Constantexprvaluekind = 10, | |
Constantarrayvaluekind = 11, | |
Constantstructvaluekind = 12, | |
Constantvectorvaluekind = 13, | |
Undefvaluevaluekind = 14, | |
Constantaggregatezerovaluekind = 15, | |
Constantdataarrayvaluekind = 16, | |
Constantdatavectorvaluekind = 17, | |
Constantintvaluekind = 18, | |
Constantfpvaluekind = 19, | |
Constantpointernullvaluekind = 20, | |
Constanttokennonevaluekind = 21, | |
Metadataasvaluevaluekind = 22, | |
Inlineasmvaluekind = 23, | |
Instructionvaluekind = 24, | |
} | |
//LLVMOpcode | |
public enum LLVMOpcode : Int32 | |
{ | |
Ret = 1, | |
Br = 2, | |
Switch = 3, | |
Indirectbr = 4, | |
Invoke = 5, | |
Unreachable = 7, | |
Add = 8, | |
Fadd = 9, | |
Sub = 10, | |
Fsub = 11, | |
Mul = 12, | |
Fmul = 13, | |
Udiv = 14, | |
Sdiv = 15, | |
Fdiv = 16, | |
Urem = 17, | |
Srem = 18, | |
Frem = 19, | |
Shl = 20, | |
Lshr = 21, | |
Ashr = 22, | |
And = 23, | |
Or = 24, | |
Xor = 25, | |
Alloca = 26, | |
Load = 27, | |
Store = 28, | |
Getelementptr = 29, | |
Trunc = 30, | |
Zext = 31, | |
Sext = 32, | |
Fptoui = 33, | |
Fptosi = 34, | |
Uitofp = 35, | |
Sitofp = 36, | |
Fptrunc = 37, | |
Fpext = 38, | |
Ptrtoint = 39, | |
Inttoptr = 40, | |
Bitcast = 41, | |
Addrspacecast = 60, | |
Icmp = 42, | |
Fcmp = 43, | |
Phi = 44, | |
Call = 45, | |
Select = 46, | |
Userop1 = 47, | |
Userop2 = 48, | |
Vaarg = 49, | |
Extractelement = 50, | |
Insertelement = 51, | |
Shufflevector = 52, | |
Extractvalue = 53, | |
Insertvalue = 54, | |
Fence = 55, | |
Atomiccmpxchg = 56, | |
Atomicrmw = 57, | |
Resume = 58, | |
Landingpad = 59, | |
Cleanupret = 61, | |
Catchret = 62, | |
Catchpad = 63, | |
Cleanuppad = 64, | |
Catchswitch = 65, | |
} | |
//LLVMIntPredicate | |
public enum LLVMIntPredicate : Int32 | |
{ | |
Eq = 32, | |
Ne = 33, | |
Ugt = 34, | |
Uge = 35, | |
Ult = 36, | |
Ule = 37, | |
Sgt = 38, | |
Sge = 39, | |
Slt = 40, | |
Sle = 41, | |
} | |
//LLVMRealPredicate | |
public enum LLVMRealPredicate : Int32 | |
{ | |
Predicatefalse = 0, | |
Oeq = 1, | |
Ogt = 2, | |
Oge = 3, | |
Olt = 4, | |
Ole = 5, | |
One = 6, | |
Ord = 7, | |
Uno = 8, | |
Ueq = 9, | |
Ugt = 10, | |
Uge = 11, | |
Ult = 12, | |
Ule = 13, | |
Une = 14, | |
Predicatetrue = 15, | |
} | |
//LLVMLinkage | |
public enum LLVMLinkage : Int32 | |
{ | |
Externallinkage = 0, | |
Availableexternallylinkage = 1, | |
Linkonceanylinkage = 2, | |
Linkonceodrlinkage = 3, | |
Linkonceodrautohidelinkage = 4, | |
Weakanylinkage = 5, | |
Weakodrlinkage = 6, | |
Appendinglinkage = 7, | |
Internallinkage = 8, | |
Privatelinkage = 9, | |
Dllimportlinkage = 10, | |
Dllexportlinkage = 11, | |
Externalweaklinkage = 12, | |
Ghostlinkage = 13, | |
Commonlinkage = 14, | |
Linkerprivatelinkage = 15, | |
Linkerprivateweaklinkage = 16, | |
} | |
//LLVMVisibility | |
public enum LLVMVisibility : Int32 | |
{ | |
Defaultvisibility = 0, | |
Hiddenvisibility = 1, | |
Protectedvisibility = 2, | |
} | |
//LLVMDLLStorageClass | |
public enum LLVMDLLStorageClass : Int32 | |
{ | |
Efaultstorageclass = 0, | |
Llimportstorageclass = 1, | |
Llexportstorageclass = 2, | |
} | |
//LLVMUnnamedAddr | |
public enum LLVMUnnamedAddr : Int32 | |
{ | |
Nounnamedaddr = 0, | |
Localunnamedaddr = 1, | |
Globalunnamedaddr = 2, | |
} | |
//LLVMThreadLocalMode | |
public enum LLVMThreadLocalMode : Int32 | |
{ | |
Notthreadlocal = 0, | |
Generaldynamictlsmodel = 1, | |
Localdynamictlsmodel = 2, | |
Initialexectlsmodel = 3, | |
Localexectlsmodel = 4, | |
} | |
//LLVMAtomicOrdering | |
public enum LLVMAtomicOrdering : Int32 | |
{ | |
Notatomic = 0, | |
Unordered = 1, | |
Monotonic = 2, | |
Acquire = 4, | |
Release = 5, | |
Acquirerelease = 6, | |
Sequentiallyconsistent = 7, | |
} | |
//LLVMAtomicRMWBinOp | |
public enum LLVMAtomicRMWBinOp : Int32 | |
{ | |
Xchg = 0, | |
Add = 1, | |
Sub = 2, | |
And = 3, | |
Nand = 4, | |
Or = 5, | |
Xor = 6, | |
Max = 7, | |
Min = 8, | |
Umax = 9, | |
Umin = 10, | |
} | |
//LLVMDWARFSourceLanguage | |
public enum LLVMDWARFSourceLanguage : Int32 | |
{ | |
C89 = 0, | |
C = 1, | |
Ada83 = 2, | |
CPlusPlus = 3, | |
Cobol74 = 4, | |
Cobol85 = 5, | |
Fortran77 = 6, | |
Fortran90 = 7, | |
Pascal83 = 8, | |
Modula2 = 9, | |
Java = 10, | |
C99 = 11, | |
Ada95 = 12, | |
Fortran95 = 13, | |
Pli = 14, | |
Objc = 15, | |
ObjcPlusPlus = 16, | |
Upc = 17, | |
D = 18, | |
Python = 19, | |
Opencl = 20, | |
Go = 21, | |
Modula3 = 22, | |
Haskell = 23, | |
CPlusPlus03 = 24, | |
CPlusPlus11 = 25, | |
Ocaml = 26, | |
Rust = 27, | |
C11 = 28, | |
Swift = 29, | |
Julia = 30, | |
Dylan = 31, | |
CPlusPlus14 = 32, | |
Fortran03 = 33, | |
Fortran08 = 34, | |
Renderscript = 35, | |
Bliss = 36, | |
MipsAssembler = 37, | |
GoogleRenderscript = 38, | |
BorlandDelphi = 39, | |
} | |
//LLVMDWARFEmissionKind | |
public enum LLVMDWARFEmissionKind : Int32 | |
{ | |
None = 0, | |
Full = 1, | |
Linetablesonly = 2, | |
} | |
//LLVMDIFlags | |
public enum LLVMDIFlags : Int32 | |
{ | |
Zero = 0, | |
Private = 1, | |
Protected = 2, | |
Public = 3, | |
Fwddecl = 4, | |
Appleblock = 8, | |
Blockbyrefstruct = 16, | |
Virtual = 32, | |
Artificial = 64, | |
Explicit = 128, | |
Prototyped = 256, | |
Objcclasscomplete = 512, | |
Objectpointer = 1024, | |
Vector = 2048, | |
Staticmember = 4096, | |
Lvaluereference = 8192, | |
Rvaluereference = 16384, | |
Reserved = 32768, | |
Singleinheritance = 65536, | |
Multipleinheritance = 131072, | |
Virtualinheritance = 196608, | |
Introducedvirtual = 262144, | |
Bitfield = 524288, | |
Noreturn = 1048576, | |
Mainsubprogram = 2097152, | |
Typepassbyvalue = 4194304, | |
Typepassbyreference = 8388608, | |
Fixedenum = 16777216, | |
Thunk = 33554432, | |
Trivial = 67108864, | |
Indirectvirtualbase = 36, | |
Accessibility = 3, | |
Ptrtomemberrep = 196608, | |
} | |
//LLVMByteOrdering | |
public enum LLVMByteOrdering : Int32 | |
{ | |
Bigendian = 0, | |
Littleendian = 1, | |
} | |
#endregion | |
#region Typedefs | |
unsafe partial struct LLVMBool | |
{ | |
public LLVMBool(Int32 value) | |
{ | |
Value = value; | |
} | |
public Int32 Value; | |
} | |
unsafe partial struct LLVMAttributeIndex | |
{ | |
public LLVMAttributeIndex(UInt32 value) | |
{ | |
Value = value; | |
} | |
public UInt32 Value; | |
} | |
unsafe partial struct LLVMDWARFTypeEncoding | |
{ | |
public LLVMDWARFTypeEncoding(UInt32 value) | |
{ | |
Value = value; | |
} | |
public UInt32 Value; | |
} | |
#endregion | |
#region Structs | |
//LLVMMCJITCompilerOptions | |
unsafe partial struct LLVMMCJITCompilerOptions | |
{ | |
private _innerLayout* ptr; | |
internal LLVMMCJITCompilerOptions(_innerLayout* ptr) => this.ptr = ptr; | |
internal unsafe struct _innerLayout | |
{ | |
public LLVMMCJITCompilerOptions Ptr() { fixed(_innerLayout* ptr = &this) return new LLVMMCJITCompilerOptions(ptr); } | |
internal uint optLevel; | |
internal int codeModel; | |
internal LLVMBool noFramePointerElim; | |
internal LLVMBool enableFastISel; | |
internal LLVMMCJITMemoryManagerRef mCJMM; | |
} | |
} | |
#endregion | |
#region RefPtr | |
//LLVMModuleRef | |
unsafe partial struct LLVMModuleRef | |
{ | |
IntPtr ptr; | |
public LLVMModuleRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMValueRef | |
unsafe partial struct LLVMValueRef | |
{ | |
IntPtr ptr; | |
public LLVMValueRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMMemoryBufferRef | |
unsafe partial struct LLVMMemoryBufferRef | |
{ | |
IntPtr ptr; | |
public LLVMMemoryBufferRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMContextRef | |
unsafe partial struct LLVMContextRef | |
{ | |
IntPtr ptr; | |
public LLVMContextRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMComdatRef | |
unsafe partial struct LLVMComdatRef | |
{ | |
IntPtr ptr; | |
public LLVMComdatRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMPassRegistryRef | |
unsafe partial struct LLVMPassRegistryRef | |
{ | |
IntPtr ptr; | |
public LLVMPassRegistryRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMDiagnosticInfoRef | |
unsafe partial struct LLVMDiagnosticInfoRef | |
{ | |
IntPtr ptr; | |
public LLVMDiagnosticInfoRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMAttributeRef | |
unsafe partial struct LLVMAttributeRef | |
{ | |
IntPtr ptr; | |
public LLVMAttributeRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMMetadataRef | |
unsafe partial struct LLVMMetadataRef | |
{ | |
IntPtr ptr; | |
public LLVMMetadataRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMTypeRef | |
unsafe partial struct LLVMTypeRef | |
{ | |
IntPtr ptr; | |
public LLVMTypeRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMUseRef | |
unsafe partial struct LLVMUseRef | |
{ | |
IntPtr ptr; | |
public LLVMUseRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMBasicBlockRef | |
unsafe partial struct LLVMBasicBlockRef | |
{ | |
IntPtr ptr; | |
public LLVMBasicBlockRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMBuilderRef | |
unsafe partial struct LLVMBuilderRef | |
{ | |
IntPtr ptr; | |
public LLVMBuilderRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMModuleProviderRef | |
unsafe partial struct LLVMModuleProviderRef | |
{ | |
IntPtr ptr; | |
public LLVMModuleProviderRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMPassManagerRef | |
unsafe partial struct LLVMPassManagerRef | |
{ | |
IntPtr ptr; | |
public LLVMPassManagerRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMDIBuilderRef | |
unsafe partial struct LLVMDIBuilderRef | |
{ | |
IntPtr ptr; | |
public LLVMDIBuilderRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMDisasmContextRef | |
unsafe partial struct LLVMDisasmContextRef | |
{ | |
IntPtr ptr; | |
public LLVMDisasmContextRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMTargetDataRef | |
unsafe partial struct LLVMTargetDataRef | |
{ | |
IntPtr ptr; | |
public LLVMTargetDataRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMTargetLibraryInfoRef | |
unsafe partial struct LLVMTargetLibraryInfoRef | |
{ | |
IntPtr ptr; | |
public LLVMTargetLibraryInfoRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMGenericValueRef | |
unsafe partial struct LLVMGenericValueRef | |
{ | |
IntPtr ptr; | |
public LLVMGenericValueRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMExecutionEngineRef | |
unsafe partial struct LLVMExecutionEngineRef | |
{ | |
IntPtr ptr; | |
public LLVMExecutionEngineRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMMCJITMemoryManagerRef | |
unsafe partial struct LLVMMCJITMemoryManagerRef | |
{ | |
IntPtr ptr; | |
public LLVMMCJITMemoryManagerRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
//LLVMJITEventListenerRef | |
unsafe partial struct LLVMJITEventListenerRef | |
{ | |
IntPtr ptr; | |
public LLVMJITEventListenerRef(IntPtr ptr) => this.ptr = ptr; | |
} | |
#endregion | |
#region OpaquePtrs | |
//LLVMModuleFlagEntry | |
unsafe partial struct LLVMModuleFlagEntry | |
{ | |
IntPtr ptr; | |
public LLVMModuleFlagEntry(IntPtr ptr) => this.ptr = ptr; | |
} | |
#endregion | |
#region FnSignature | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate void LLVMFatalErrorHandlerDelegate(string reason); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate void LLVMDiagnosticHandlerDelegate(LLVMDiagnosticInfoRef param0, IntPtr param1); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate void LLVMYieldCallbackDelegate(LLVMContextRef param0, IntPtr param1); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate int LLVMOpInfoCallbackDelegate(IntPtr disInfo, ulong pC, ulong offset, ulong size, int tagType, IntPtr tagBuf); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate string LLVMSymbolLookupCallbackDelegate(IntPtr disInfo, ulong referenceValue, out ulong referenceType, ulong referencePC, in byte* referenceName); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate char* LLVMMemoryManagerAllocateCodeSectionCallbackDelegate(byte uint8T, IntPtr opaque, UIntPtr size, uint alignment, uint sectionID, string sectionName); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate char* LLVMMemoryManagerAllocateDataSectionCallbackDelegate(byte uint8T, IntPtr opaque, UIntPtr size, uint alignment, uint sectionID, string sectionName, LLVMBool isReadOnly); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate int LLVMMemoryManagerFinalizeMemoryCallbackDelegate(LLVMBool lLVMBool, IntPtr opaque, out byte* errMsg); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
internal unsafe delegate void LLVMMemoryManagerDestroyCallbackDelegate(IntPtr opaque); | |
#endregion | |
#region Unions | |
#endregion | |
#region Fixed Arrays | |
#endregion | |
internal unsafe static partial class LLVM | |
{ | |
/// <summary> | |
/// LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, | |
/// char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> Verifies that a module is valid, taking the specified action if not. Optionally returns a human-readable description of any invalid constructs. OutMessage must be disposed with LLVMDisposeMessage. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMVerifyModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool VerifyModule(LLVMModuleRef m, LLVMVerifierFailureAction action, out byte* outMessage); | |
/// <summary> | |
/// LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action) | |
/// </summary> | |
/// <remarks> | |
///<para> Verifies that a single function is valid, taking the specified action. Useful for debugging. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMVerifyFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool VerifyFunction(LLVMValueRef fn, LLVMVerifierFailureAction action); | |
/// <summary> | |
/// void LLVMViewFunctionCFG(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Open up a ghostview window that displays the CFG of the current function. Useful for debugging. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMViewFunctionCFG", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ViewFunctionCFG(LLVMValueRef fn); | |
[DllImport(DLL, EntryPoint = "LLVMViewFunctionCFGOnly", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ViewFunctionCFGOnly(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, | |
/// char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. Optionally returns a human-readable error message via OutMessage.</para> | |
///<para> This is deprecated. Use LLVMParseBitcode2. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMParseBitcode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool ParseBitcode(LLVMMemoryBufferRef memBuf, LLVMModuleRef* outModule, out byte* outMessage); | |
/// <summary> | |
/// LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule) | |
/// </summary> | |
/// <remarks> | |
///<para> Builds a module from the bitcode in the specified memory buffer, returning a reference to the module via the OutModule parameter. Returns 0 on success. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMParseBitcode2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool ParseBitcode2(LLVMMemoryBufferRef memBuf, LLVMModuleRef* outModule); | |
/// <summary> | |
/// LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, | |
/// LLVMMemoryBufferRef MemBuf, | |
/// LLVMModuleRef *OutModule, char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> This is deprecated. Use LLVMParseBitcodeInContext2. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMParseBitcodeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool ParseBitcodeInContext(LLVMContextRef contextRef, LLVMMemoryBufferRef memBuf, LLVMModuleRef* outModule, out byte* outMessage); | |
[DllImport(DLL, EntryPoint = "LLVMParseBitcodeInContext2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool ParseBitcodeInContext2(LLVMContextRef contextRef, LLVMMemoryBufferRef memBuf, LLVMModuleRef* outModule); | |
/// <summary> | |
/// LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, | |
/// LLVMMemoryBufferRef MemBuf, | |
/// LLVMModuleRef *OutM, char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. This is deprecated. Use LLVMGetBitcodeModuleInContext2. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBitcodeModuleInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool GetBitcodeModuleInContext(LLVMContextRef contextRef, LLVMMemoryBufferRef memBuf, LLVMModuleRef* outM, out byte* outMessage); | |
/// <summary> | |
/// LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef, | |
/// LLVMMemoryBufferRef MemBuf, | |
/// LLVMModuleRef *OutM) | |
/// </summary> | |
/// <remarks> | |
///<para> Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBitcodeModuleInContext2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool GetBitcodeModuleInContext2(LLVMContextRef contextRef, LLVMMemoryBufferRef memBuf, LLVMModuleRef* outM); | |
/// <summary> | |
/// LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, | |
/// char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> This is deprecated. Use LLVMGetBitcodeModule2. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBitcodeModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool GetBitcodeModule(LLVMMemoryBufferRef memBuf, LLVMModuleRef* outM, out byte* outMessage); | |
[DllImport(DLL, EntryPoint = "LLVMGetBitcodeModule2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool GetBitcodeModule2(LLVMMemoryBufferRef memBuf, LLVMModuleRef* outM); | |
/// <summary> | |
/// int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) | |
/// </summary> | |
/// <remarks> | |
///<para> Writes a module to the specified path. Returns 0 on success. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMWriteBitcodeToFile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int WriteBitcodeToFile(LLVMModuleRef m, string path); | |
/// <summary> | |
/// int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose, | |
/// int Unbuffered) | |
/// </summary> | |
/// <remarks> | |
///<para> Writes a module to an open file descriptor. Returns 0 on success. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMWriteBitcodeToFD", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int WriteBitcodeToFD(LLVMModuleRef m, int fD, int shouldClose, int unbuffered); | |
/// <summary> | |
/// int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file descriptor. Returns 0 on success. Closes the Handle. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMWriteBitcodeToFileHandle", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int WriteBitcodeToFileHandle(LLVMModuleRef m, int handle); | |
/// <summary> | |
/// LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Writes a module to a new memory buffer and returns it. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMWriteBitcodeToMemoryBuffer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMemoryBufferRef WriteBitcodeToMemoryBuffer(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the Comdat in the module with the specified name. It is created if it didn't already exist.</para> | |
///<para> llvm::Module::getOrInsertComdat()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetOrInsertComdat", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMComdatRef GetOrInsertComdat(LLVMModuleRef m, string name); | |
/// <summary> | |
/// LLVMComdatRef LLVMGetComdat(LLVMValueRef V) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the Comdat assigned to the given global object.</para> | |
///<para> llvm::GlobalObject::getComdat()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetComdat", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMComdatRef GetComdat(LLVMValueRef v); | |
/// <summary> | |
/// void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Assign the Comdat to the given global object.</para> | |
///<para> llvm::GlobalObject::setComdat()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetComdat", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetComdat(LLVMValueRef v, LLVMComdatRef c); | |
/// <summary> | |
/// LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the conflict resolution selection kind for the Comdat.</para> | |
///<para> llvm::Comdat::getSelectionKind()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetComdatSelectionKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMComdatSelectionKind GetComdatSelectionKind(LLVMComdatRef c); | |
/// <summary> | |
/// void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the conflict resolution selection kind for the Comdat.</para> | |
///<para> llvm::Comdat::setSelectionKind()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetComdatSelectionKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetComdatSelectionKind(LLVMComdatRef c, LLVMComdatSelectionKind kind); | |
/// <summary> | |
/// void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler) | |
/// </summary> | |
/// <remarks> | |
///<para> Install a fatal error handler. By default, if LLVM detects a fatal error, it will call exit(1). This may not be appropriate in many contexts. For example, doing exit(1) will bypass many crash reporting/tracing system tools. This function allows you to install a callback that will be invoked prior to the call to exit(1).</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInstallFatalErrorHandler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InstallFatalErrorHandler(LLVMFatalErrorHandlerDelegate handler); | |
/// <summary> | |
/// void LLVMResetFatalErrorHandler() | |
/// </summary> | |
/// <remarks> | |
///<para> Reset the fatal error handler. This resets LLVM's fatal error handling behavior to the default.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMResetFatalErrorHandler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ResetFatalErrorHandler(); | |
/// <summary> | |
/// void LLVMEnablePrettyStackTrace() | |
/// </summary> | |
/// <remarks> | |
///<para> Enable LLVM's built-in stack trace code. This intercepts the OS's crash signals and prints which component of LLVM you were in at the time if the crash.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMEnablePrettyStackTrace", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void EnablePrettyStackTrace(); | |
/// <summary> | |
/// void LLVMInitializeCore(LLVMPassRegistryRef R) | |
/// </summary> | |
/// <remarks> | |
///<para> @}</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeCore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeCore(LLVMPassRegistryRef r); | |
/// <summary> | |
/// void LLVMShutdown() | |
/// </summary> | |
/// <remarks> | |
///<para> Deallocate and destroy all ManagedStatic variables. </para> | |
///<para> llvm::llvm_shutdown </para> | |
///<para> ManagedStatic </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMShutdown", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void Shutdown(); | |
/// <summary> | |
/// char *LLVMCreateMessage(const char *Message) | |
/// </summary> | |
/// <remarks> | |
///<para>===-- Error handling ----------------------------------------------------===</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateMessage", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* CreateMessage(string message); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeMessage", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeMessage(out byte message); | |
/// <summary> | |
/// LLVMContextRef LLVMContextCreate() | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new context.</para> | |
///<para> Every call to this function should be paired with a call to LLVMContextDispose() or the context will leak memory.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextCreate", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMContextRef ContextCreate(); | |
/// <summary> | |
/// LLVMContextRef LLVMGetGlobalContext() | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the global context instance.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetGlobalContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMContextRef GetGlobalContext(); | |
/// <summary> | |
/// void LLVMContextSetDiagnosticHandler(LLVMContextRef C, | |
/// LLVMDiagnosticHandler Handler, | |
/// void *DiagnosticContext) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the diagnostic handler for this context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextSetDiagnosticHandler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ContextSetDiagnosticHandler(LLVMContextRef c, LLVMDiagnosticHandlerDelegate handler, IntPtr diagnosticContext); | |
/// <summary> | |
/// LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the diagnostic handler of this context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextGetDiagnosticHandler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDiagnosticHandlerDelegate ContextGetDiagnosticHandler(LLVMContextRef c); | |
/// <summary> | |
/// void *LLVMContextGetDiagnosticContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the diagnostic context of this context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextGetDiagnosticContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern IntPtr ContextGetDiagnosticContext(LLVMContextRef c); | |
/// <summary> | |
/// void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback, | |
/// void *OpaqueHandle) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the yield callback function for this context.</para> | |
///<para> LLVMContext::setYieldCallback()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextSetYieldCallback", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ContextSetYieldCallback(LLVMContextRef c, LLVMYieldCallbackDelegate callback, IntPtr opaqueHandle); | |
/// <summary> | |
/// void LLVMContextDispose(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Destroy a context instance.</para> | |
///<para> This should be called for every call to LLVMContextCreate() or memory will be leaked.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMContextDispose", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ContextDispose(LLVMContextRef c); | |
/// <summary> | |
/// char *LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI) | |
/// </summary> | |
/// <remarks> | |
///<para> Return a string representation of the DiagnosticInfo. Use LLVMDisposeMessage to free the string.</para> | |
///<para> DiagnosticInfo::print()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetDiagInfoDescription", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* GetDiagInfoDescription(LLVMDiagnosticInfoRef dI); | |
/// <summary> | |
/// LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI) | |
/// </summary> | |
/// <remarks> | |
///<para> Return an enum LLVMDiagnosticSeverity.</para> | |
///<para> DiagnosticInfo::getSeverity()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetDiagInfoSeverity", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDiagnosticSeverity GetDiagInfoSeverity(LLVMDiagnosticInfoRef dI); | |
[DllImport(DLL, EntryPoint = "LLVMGetMDKindIDInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetMDKindIDInContext(LLVMContextRef c, string name, uint sLen); | |
[DllImport(DLL, EntryPoint = "LLVMGetMDKindID", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetMDKindID(string name, uint sLen); | |
/// <summary> | |
/// unsigned int LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Return an unique id given the name of a enum attribute, or 0 if no attribute by that name exists.</para> | |
///<para> See http://llvm.org/docs/LangRef.html#parameter-attributes and http://llvm.org/docs/LangRef.html#function-attributes for the list of available attributes.</para> | |
///<para> NB: Attribute names and/or id are subject to change without going through the C API deprecation cycle.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetEnumAttributeKindForName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetEnumAttributeKindForName(string name, UIntPtr sLen); | |
[DllImport(DLL, EntryPoint = "LLVMGetLastEnumAttributeKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetLastEnumAttributeKind(); | |
/// <summary> | |
/// LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned int KindID, | |
/// uint64_t Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Create an enum attribute.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateEnumAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef CreateEnumAttribute(LLVMContextRef c, uint kindID, ulong val); | |
/// <summary> | |
/// unsigned int LLVMGetEnumAttributeKind(LLVMAttributeRef A) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the unique id corresponding to the enum attribute passed as argument.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetEnumAttributeKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetEnumAttributeKind(LLVMAttributeRef a); | |
/// <summary> | |
/// uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the enum attribute's value. 0 is returned if none exists.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetEnumAttributeValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong GetEnumAttributeValue(LLVMAttributeRef a); | |
/// <summary> | |
/// LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C, const char *K, | |
/// unsigned int KLength, const char *V, | |
/// unsigned int VLength) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a string attribute.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateStringAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef CreateStringAttribute(LLVMContextRef c, string k, uint kLength, string v, uint vLength); | |
/// <summary> | |
/// const char *LLVMGetStringAttributeKind(LLVMAttributeRef A, unsigned int *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the string attribute's kind.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetStringAttributeKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetStringAttributeKind(LLVMAttributeRef a, out uint length); | |
/// <summary> | |
/// const char *LLVMGetStringAttributeValue(LLVMAttributeRef A, | |
/// unsigned int *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the string attribute's value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetStringAttributeValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetStringAttributeValue(LLVMAttributeRef a, out uint length); | |
/// <summary> | |
/// LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A) | |
/// </summary> | |
/// <remarks> | |
///<para> Check for the different types of attributes.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsEnumAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsEnumAttribute(LLVMAttributeRef a); | |
[DllImport(DLL, EntryPoint = "LLVMIsStringAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsStringAttribute(LLVMAttributeRef a); | |
/// <summary> | |
/// LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new, empty module in the global context.</para> | |
///<para> This is equivalent to calling LLVMModuleCreateWithNameInContext with LLVMGetGlobalContext() as the context parameter.</para> | |
///<para> Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMModuleCreateWithName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleRef ModuleCreateWithName(string moduleID); | |
/// <summary> | |
/// LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, | |
/// LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new, empty module in a specific context.</para> | |
///<para> Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMModuleCreateWithNameInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleRef ModuleCreateWithNameInContext(string moduleID, LLVMContextRef c); | |
/// <summary> | |
/// LLVMModuleRef LLVMCloneModule(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Return an exact copy of the specified module.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCloneModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleRef CloneModule(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMDisposeModule(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Destroy a module instance.</para> | |
///<para> This must be called for every created module or memory will be leaked.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeModule(LLVMModuleRef m); | |
/// <summary> | |
/// const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the identifier of a module.</para> | |
///<para> Module to obtain identifier of </para> | |
///<para> Out parameter which holds the length of the returned string. </para> | |
///<para> The identifier of M. </para> | |
///<para> Module::getModuleIdentifier()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleIdentifier", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetModuleIdentifier(LLVMModuleRef m, out UIntPtr len); | |
/// <summary> | |
/// void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the identifier of a module to a string Ident with length Len.</para> | |
///<para> The module to set identifier </para> | |
///<para> The string to set M's identifier to </para> | |
///<para> Length of Ident </para> | |
///<para> Module::setModuleIdentifier()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetModuleIdentifier", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetModuleIdentifier(LLVMModuleRef m, string ident, UIntPtr len); | |
/// <summary> | |
/// const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the module's original source file name.</para> | |
///<para> Module to obtain the name of </para> | |
///<para> Out parameter which holds the length of the returned string </para> | |
///<para> The original source file name of M </para> | |
///<para> Module::getSourceFileName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetSourceFileName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetSourceFileName(LLVMModuleRef m, out UIntPtr len); | |
/// <summary> | |
/// void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name, size_t Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the original source file name of a module to a string Name with length Len.</para> | |
///<para> The module to set the source file name of </para> | |
///<para> The string to set M's source file name to </para> | |
///<para> Length of Name </para> | |
///<para> Module::setSourceFileName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetSourceFileName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetSourceFileName(LLVMModuleRef m, string name, UIntPtr len); | |
/// <summary> | |
/// const char *LLVMGetDataLayoutStr(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the data layout for a module.</para> | |
///<para> Module::getDataLayoutStr()</para> | |
///<para> LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect, but match the name of another method on the module. Prefer the use of LLVMGetDataLayoutStr, which is not ambiguous.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetDataLayoutStr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetDataLayoutStr(LLVMModuleRef m); | |
[DllImport(DLL, EntryPoint = "LLVMGetDataLayout", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetDataLayout(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the data layout for a module.</para> | |
///<para> Module::setDataLayout()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetDataLayout", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetDataLayout(LLVMModuleRef m, string dataLayoutStr); | |
/// <summary> | |
/// const char *LLVMGetTarget(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the target triple for a module.</para> | |
///<para> Module::getTargetTriple()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetTarget", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetTarget(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMSetTarget(LLVMModuleRef M, const char *Triple) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the target triple for a module.</para> | |
///<para> Module::setTargetTriple()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetTarget", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetTarget(LLVMModuleRef m, string triple); | |
/// <summary> | |
/// LLVMModuleFlagEntry *LLVMCopyModuleFlagsMetadata(LLVMModuleRef M, size_t *Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the module flags as an array of flag-key-value triples. The caller is responsible for freeing this array by calling LLVMDisposeModuleFlagsMetadata.</para> | |
///<para> Module::getModuleFlagsMetadata()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCopyModuleFlagsMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleFlagEntry CopyModuleFlagsMetadata(LLVMModuleRef m, out UIntPtr len); | |
/// <summary> | |
/// void LLVMDisposeModuleFlagsMetadata(LLVMModuleFlagEntry *Entries) | |
/// </summary> | |
/// <remarks> | |
///<para> Destroys module flags metadata entries.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeModuleFlagsMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeModuleFlagsMetadata(LLVMModuleFlagEntry entries); | |
/// <summary> | |
/// LLVMModuleFlagBehavior | |
/// LLVMModuleFlagEntriesGetFlagBehavior(LLVMModuleFlagEntry *Entries, | |
/// unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the flag behavior for a module flag entry at a specific index.</para> | |
///<para> Module::ModuleFlagEntry::Behavior</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMModuleFlagEntriesGetFlagBehavior", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleFlagBehavior ModuleFlagEntriesGetFlagBehavior(LLVMModuleFlagEntry entries, uint index); | |
/// <summary> | |
/// const char *LLVMModuleFlagEntriesGetKey(LLVMModuleFlagEntry *Entries, | |
/// unsigned int Index, size_t *Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the key for a module flag entry at a specific index.</para> | |
///<para> Module::ModuleFlagEntry::Key</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMModuleFlagEntriesGetKey", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string ModuleFlagEntriesGetKey(LLVMModuleFlagEntry entries, uint index, out UIntPtr len); | |
/// <summary> | |
/// LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry *Entries, | |
/// unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the metadata for a module flag entry at a specific index.</para> | |
///<para> Module::ModuleFlagEntry::Val</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMModuleFlagEntriesGetMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef ModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry entries, uint index); | |
/// <summary> | |
/// LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M, const char *Key, | |
/// size_t KeyLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a module-level flag to the module-level flags metadata if it doesn't already exist.</para> | |
///<para> Module::getModuleFlag()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleFlag", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef GetModuleFlag(LLVMModuleRef m, string key, UIntPtr keyLen); | |
/// <summary> | |
/// void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, | |
/// const char *Key, size_t KeyLen, LLVMMetadataRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a module-level flag to the module-level flags metadata if it doesn't already exist.</para> | |
///<para> Module::addModuleFlag()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddModuleFlag", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddModuleFlag(LLVMModuleRef m, LLVMModuleFlagBehavior behavior, string key, UIntPtr keyLen, LLVMMetadataRef val); | |
/// <summary> | |
/// void LLVMDumpModule(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Dump a representation of a module to stderr.</para> | |
///<para> Module::dump()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDumpModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DumpModule(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename, | |
/// char **ErrorMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> Print a representation of a module to a file. The ErrorMessage needs to be disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.</para> | |
///<para> Module::print()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPrintModuleToFile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool PrintModuleToFile(LLVMModuleRef m, string filename, out byte* errorMessage); | |
/// <summary> | |
/// char *LLVMPrintModuleToString(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Return a string representation of the module. Use LLVMDisposeMessage to free the string.</para> | |
///<para> Module::print()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPrintModuleToString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* PrintModuleToString(LLVMModuleRef m); | |
/// <summary> | |
/// const char *LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Get inline assembly for a module.</para> | |
///<para> Module::getModuleInlineAsm()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetModuleInlineAsm(LLVMModuleRef m, out UIntPtr len); | |
/// <summary> | |
/// void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm, size_t Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Set inline assembly for a module.</para> | |
///<para> Module::setModuleInlineAsm()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetModuleInlineAsm2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetModuleInlineAsm2(LLVMModuleRef m, string asm, UIntPtr len); | |
/// <summary> | |
/// void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm, size_t Len) | |
/// </summary> | |
/// <remarks> | |
///<para> Append inline assembly to a module.</para> | |
///<para> Module::appendModuleInlineAsm()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAppendModuleInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AppendModuleInlineAsm(LLVMModuleRef m, string asm, UIntPtr len); | |
/// <summary> | |
/// LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty, char *AsmString, | |
/// size_t AsmStringSize, char *Constraints, | |
/// size_t ConstraintsSize, LLVMBool HasSideEffects, | |
/// LLVMBool IsAlignStack, | |
/// LLVMInlineAsmDialect Dialect) | |
/// </summary> | |
/// <remarks> | |
///<para> Create the specified uniqued inline asm string.</para> | |
///<para> InlineAsm::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetInlineAsm(LLVMTypeRef ty, out byte asmString, UIntPtr asmStringSize, out byte constraints, UIntPtr constraintsSize, LLVMBool hasSideEffects, LLVMBool isAlignStack, LLVMInlineAsmDialect dialect); | |
/// <summary> | |
/// LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the context to which this module is associated.</para> | |
///<para> Module::getContext()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMContextRef GetModuleContext(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a Type from a module by its registered name.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetTypeByName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef GetTypeByName(LLVMModuleRef m, string name); | |
/// <summary> | |
/// unsigned int LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of operands for named metadata in a module.</para> | |
///<para> llvm::Module::getNamedMetadata()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNamedMetadataNumOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNamedMetadataNumOperands(LLVMModuleRef m, string name); | |
/// <summary> | |
/// void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, | |
/// LLVMValueRef *Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the named metadata operands for a module.</para> | |
///<para> The passed LLVMValueRef pointer should refer to an array of LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This array will be populated with the LLVMValueRef instances. Each instance corresponds to a llvm::MDNode.</para> | |
///<para> llvm::Module::getNamedMetadata() </para> | |
///<para> llvm::MDNode::getOperand()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNamedMetadataOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetNamedMetadataOperands(LLVMModuleRef m, string name, LLVMValueRef* dest); | |
/// <summary> | |
/// void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, | |
/// LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Add an operand to named metadata.</para> | |
///<para> llvm::Module::getNamedMetadata() </para> | |
///<para> llvm::MDNode::addOperand()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddNamedMetadataOperand", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddNamedMetadataOperand(LLVMModuleRef m, string name, LLVMValueRef val); | |
/// <summary> | |
/// LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, | |
/// LLVMTypeRef FunctionTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a function to a module under a specified name.</para> | |
///<para> llvm::Function::Create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AddFunction(LLVMModuleRef m, string name, LLVMTypeRef functionTy); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a Function value from a Module by its name.</para> | |
///<para> The returned value corresponds to a llvm::Function value.</para> | |
///<para> llvm::Module::getFunction()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNamedFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNamedFunction(LLVMModuleRef m, string name); | |
/// <summary> | |
/// LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an iterator to the first Function in a Module.</para> | |
///<para> llvm::Module::begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetFirstFunction(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an iterator to the last Function in a Module.</para> | |
///<para> llvm::Module::end()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetLastFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetLastFunction(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Advance a Function iterator to the next Function.</para> | |
///<para> Returns NULL if the iterator was already at the end and there are no more functions.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNextFunction(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Decrement a Function iterator to the previous Function.</para> | |
///<para> Returns NULL if the iterator was already at the beginning and there are no previous functions.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPreviousFunction(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMSetModuleInlineAsm2 instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetModuleInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetModuleInlineAsm(LLVMModuleRef m, string asm); | |
/// <summary> | |
/// LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the enumerated type of a Type instance.</para> | |
///<para> llvm::Type:getTypeID()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetTypeKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeKind GetTypeKind(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Whether the type has a known size.</para> | |
///<para> Things that don't have a size are abstract types, labels, and void.a</para> | |
///<para> llvm::Type::isSized()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMTypeIsSized", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool TypeIsSized(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the context to which this type instance is associated.</para> | |
///<para> llvm::Type::getContext()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetTypeContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMContextRef GetTypeContext(LLVMTypeRef ty); | |
/// <summary> | |
/// void LLVMDumpType(LLVMTypeRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Dump a representation of a type to stderr.</para> | |
///<para> llvm::Type::dump()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDumpType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DumpType(LLVMTypeRef val); | |
/// <summary> | |
/// char *LLVMPrintTypeToString(LLVMTypeRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Return a string representation of the type. Use LLVMDisposeMessage to free the string.</para> | |
///<para> llvm::Type::print()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPrintTypeToString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* PrintTypeToString(LLVMTypeRef val); | |
/// <summary> | |
/// LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an integer type from a context with specified bit width.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInt1TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int1TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMInt8TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int8TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMInt16TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int16TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMInt32TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int32TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMInt64TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int64TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMInt128TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int128TypeInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMIntTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntTypeInContext(LLVMContextRef c, uint numBits); | |
/// <summary> | |
/// LLVMTypeRef LLVMInt1Type() | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an integer type from the global context with a specified bit width.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInt1Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int1Type(); | |
[DllImport(DLL, EntryPoint = "LLVMInt8Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int8Type(); | |
[DllImport(DLL, EntryPoint = "LLVMInt16Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int16Type(); | |
[DllImport(DLL, EntryPoint = "LLVMInt32Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int32Type(); | |
[DllImport(DLL, EntryPoint = "LLVMInt64Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int64Type(); | |
[DllImport(DLL, EntryPoint = "LLVMInt128Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef Int128Type(); | |
[DllImport(DLL, EntryPoint = "LLVMIntType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntType(uint numBits); | |
[DllImport(DLL, EntryPoint = "LLVMGetIntTypeWidth", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetIntTypeWidth(LLVMTypeRef integerTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 16-bit floating point type from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMHalfTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef HalfTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 32-bit floating point type from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMFloatTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef FloatTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 64-bit floating point type from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDoubleTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef DoubleTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 80-bit floating point type (X87) from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMX86FP80TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef X86FP80TypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 128-bit floating point type (112-bit mantissa) from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMFP128TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef FP128TypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a 128-bit floating point type (two 64-bits) from a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPPCFP128TypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef PPCFP128TypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMHalfType() | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a floating point type from the global context.</para> | |
///<para> These map to the functions in this group of the same name.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMHalfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef HalfType(); | |
[DllImport(DLL, EntryPoint = "LLVMFloatType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef FloatType(); | |
[DllImport(DLL, EntryPoint = "LLVMDoubleType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef DoubleType(); | |
[DllImport(DLL, EntryPoint = "LLVMX86FP80Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef X86FP80Type(); | |
[DllImport(DLL, EntryPoint = "LLVMFP128Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef FP128Type(); | |
[DllImport(DLL, EntryPoint = "LLVMPPCFP128Type", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef PPCFP128Type(); | |
/// <summary> | |
/// LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, | |
/// unsigned int ParamCount, LLVMBool IsVarArg) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a function type consisting of a specified signature.</para> | |
///<para> The function is defined as a tuple of a return Type, a list of parameter types, and whether the function is variadic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMFunctionType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef FunctionType(LLVMTypeRef returnType, LLVMTypeRef* paramTypes, uint paramCount, LLVMBool isVarArg); | |
/// <summary> | |
/// LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns whether a function type is variadic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsFunctionVarArg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsFunctionVarArg(LLVMTypeRef functionTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the Type this function Type returns.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetReturnType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef GetReturnType(LLVMTypeRef functionTy); | |
/// <summary> | |
/// unsigned int LLVMCountParamTypes(LLVMTypeRef FunctionTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of parameters this function accepts.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCountParamTypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CountParamTypes(LLVMTypeRef functionTy); | |
/// <summary> | |
/// void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the types of a function's parameters.</para> | |
///<para> The function type to operate on. </para> | |
///<para> Memory address of an array to be filled with result.</para> | |
///<para> The Dest parameter should point to a pre-allocated array of LLVMTypeRef at least LLVMCountParamTypes() large. On return, the first LLVMCountParamTypes() entries in the array will be populated with LLVMTypeRef instances.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetParamTypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetParamTypes(LLVMTypeRef functionTy, LLVMTypeRef* dest); | |
/// <summary> | |
/// LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, | |
/// unsigned int ElementCount, LLVMBool Packed) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new structure type in a context.</para> | |
///<para> A structure is specified by a list of inner elements/types and whether these can be packed together.</para> | |
///<para> llvm::StructType::create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStructTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef StructTypeInContext(LLVMContextRef c, LLVMTypeRef* elementTypes, uint elementCount, LLVMBool packed); | |
/// <summary> | |
/// LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned int ElementCount, | |
/// LLVMBool Packed) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new structure type in the global context.</para> | |
///<para> llvm::StructType::create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStructType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef StructType(LLVMTypeRef* elementTypes, uint elementCount, LLVMBool packed); | |
/// <summary> | |
/// LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Create an empty structure in a context having a specified name.</para> | |
///<para> llvm::StructType::create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStructCreateNamed", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef StructCreateNamed(LLVMContextRef c, string name); | |
/// <summary> | |
/// const char *LLVMGetStructName(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the name of a structure.</para> | |
///<para> llvm::StructType::getName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetStructName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetStructName(LLVMTypeRef ty); | |
/// <summary> | |
/// void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, | |
/// unsigned int ElementCount, LLVMBool Packed) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the contents of a structure type.</para> | |
///<para> llvm::StructType::setBody()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStructSetBody", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void StructSetBody(LLVMTypeRef structTy, LLVMTypeRef* elementTypes, uint elementCount, LLVMBool packed); | |
/// <summary> | |
/// unsigned int LLVMCountStructElementTypes(LLVMTypeRef StructTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the number of elements defined inside the structure.</para> | |
///<para> llvm::StructType::getNumElements()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCountStructElementTypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CountStructElementTypes(LLVMTypeRef structTy); | |
/// <summary> | |
/// void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the elements within a structure.</para> | |
///<para> The function is passed the address of a pre-allocated array of LLVMTypeRef at least LLVMCountStructElementTypes() long. After invocation, this array will be populated with the structure's elements. The objects in the destination array will have a lifetime of the structure type itself, which is the lifetime of the context it is contained in.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetStructElementTypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetStructElementTypes(LLVMTypeRef structTy, LLVMTypeRef* dest); | |
/// <summary> | |
/// LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned int i) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the type of the element at a given index in the structure.</para> | |
///<para> llvm::StructType::getTypeAtIndex()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStructGetTypeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef StructGetTypeAtIndex(LLVMTypeRef structTy, uint i); | |
/// <summary> | |
/// LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether a structure is packed.</para> | |
///<para> llvm::StructType::isPacked()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsPackedStruct", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsPackedStruct(LLVMTypeRef structTy); | |
/// <summary> | |
/// LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether a structure is opaque.</para> | |
///<para> llvm::StructType::isOpaque()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsOpaqueStruct", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsOpaqueStruct(LLVMTypeRef structTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the type of elements within a sequential type.</para> | |
///<para> This works on array, vector, and pointer types.</para> | |
///<para> llvm::SequentialType::getElementType()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetElementType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef GetElementType(LLVMTypeRef ty); | |
/// <summary> | |
/// void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns type's subtypes</para> | |
///<para> llvm::Type::subtypes()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetSubtypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetSubtypes(LLVMTypeRef tp, LLVMTypeRef* arr); | |
/// <summary> | |
/// unsigned int LLVMGetNumContainedTypes(LLVMTypeRef Tp) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the number of types in the derived type.</para> | |
///<para> llvm::Type::getNumContainedTypes()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumContainedTypes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumContainedTypes(LLVMTypeRef tp); | |
/// <summary> | |
/// LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned int ElementCount) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a fixed size array type that refers to a specific type.</para> | |
///<para> The created type will exist in the context that its element type exists in.</para> | |
///<para> llvm::ArrayType::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMArrayType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef ArrayType(LLVMTypeRef elementType, uint elementCount); | |
/// <summary> | |
/// unsigned int LLVMGetArrayLength(LLVMTypeRef ArrayTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the length of an array type.</para> | |
///<para> This only works on types that represent arrays.</para> | |
///<para> llvm::ArrayType::getNumElements()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetArrayLength", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetArrayLength(LLVMTypeRef arrayTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned int AddressSpace) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a pointer type that points to a defined type.</para> | |
///<para> The created type will exist in the context that its pointee type exists in.</para> | |
///<para> llvm::PointerType::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPointerType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef PointerType(LLVMTypeRef elementType, uint addressSpace); | |
/// <summary> | |
/// unsigned int LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the address space of a pointer type.</para> | |
///<para> This only works on types that represent pointers.</para> | |
///<para> llvm::PointerType::getAddressSpace()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPointerAddressSpace", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetPointerAddressSpace(LLVMTypeRef pointerTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned int ElementCount) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a vector type that contains a defined type and has a specific number of elements.</para> | |
///<para> The created type will exist in the context thats its element type exists in.</para> | |
///<para> llvm::VectorType::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMVectorType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef VectorType(LLVMTypeRef elementType, uint elementCount); | |
/// <summary> | |
/// unsigned int LLVMGetVectorSize(LLVMTypeRef VectorTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of elements in a vector type.</para> | |
///<para> This only works on types that represent vectors.</para> | |
///<para> llvm::VectorType::getNumElements()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetVectorSize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetVectorSize(LLVMTypeRef vectorTy); | |
/// <summary> | |
/// LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a void type in a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMVoidTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef VoidTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a label type in a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMLabelTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef LabelTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a X86 MMX type in a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMX86MMXTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef X86MMXTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a token type in a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMTokenTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef TokenTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a metadata type in a context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMetadataTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef MetadataTypeInContext(LLVMContextRef c); | |
/// <summary> | |
/// LLVMTypeRef LLVMVoidType() | |
/// </summary> | |
/// <remarks> | |
///<para> These are similar to the above functions except they operate on the global context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMVoidType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef VoidType(); | |
[DllImport(DLL, EntryPoint = "LLVMLabelType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef LabelType(); | |
[DllImport(DLL, EntryPoint = "LLVMX86MMXType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef X86MMXType(); | |
/// <summary> | |
/// LLVMTypeRef LLVMTypeOf(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the type of a value.</para> | |
///<para> llvm::Value::getType()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMTypeOf", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef TypeOf(LLVMValueRef val); | |
/// <summary> | |
/// LLVMValueKind LLVMGetValueKind(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the enumerated type of a Value instance.</para> | |
///<para> llvm::Value::getValueID()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetValueKind", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueKind GetValueKind(LLVMValueRef val); | |
/// <summary> | |
/// const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the string name of a value.</para> | |
///<para> llvm::Value::getName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetValueName2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetValueName2(LLVMValueRef val, out UIntPtr length); | |
/// <summary> | |
/// void LLVMSetValueName2(LLVMValueRef Val, const char *Name, size_t NameLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the string name of a value.</para> | |
///<para> llvm::Value::setName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetValueName2", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetValueName2(LLVMValueRef val, string name, UIntPtr nameLen); | |
/// <summary> | |
/// void LLVMDumpValue(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Dump a representation of a value to stderr.</para> | |
///<para> llvm::Value::dump()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDumpValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DumpValue(LLVMValueRef val); | |
/// <summary> | |
/// char *LLVMPrintValueToString(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Return a string representation of the value. Use LLVMDisposeMessage to free the string.</para> | |
///<para> llvm::Value::print()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPrintValueToString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* PrintValueToString(LLVMValueRef val); | |
/// <summary> | |
/// void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal) | |
/// </summary> | |
/// <remarks> | |
///<para> Replace all uses of a value with another one.</para> | |
///<para> llvm::Value::replaceAllUsesWith()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMReplaceAllUsesWith", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ReplaceAllUsesWith(LLVMValueRef oldVal, LLVMValueRef newVal); | |
/// <summary> | |
/// LLVMBool LLVMIsConstant(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether the specified value instance is constant.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsConstant", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsConstant(LLVMValueRef val); | |
/// <summary> | |
/// LLVMBool LLVMIsUndef(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether a value instance is undefined.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsUndef", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsUndef(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAArgument", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAArgument(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsABasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsABasicBlock(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAInlineAsm(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAUser", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAUser(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstant", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstant(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsABlockAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsABlockAddress(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantAggregateZero", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantAggregateZero(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantArray", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantArray(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantDataSequential", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantDataSequential(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantDataArray", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantDataArray(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantDataVector", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantDataVector(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantExpr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantExpr(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantFP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantFP(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantInt(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantPointerNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantPointerNull(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantStruct", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantStruct(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantTokenNone", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantTokenNone(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAConstantVector", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAConstantVector(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAGlobalValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAGlobalValue(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAGlobalAlias(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAGlobalObject", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAGlobalObject(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFunction(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAGlobalVariable", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAGlobalVariable(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAUndefValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAUndefValue(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAInstruction(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsABinaryOperator", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsABinaryOperator(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACallInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACallInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAIntrinsicInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAIntrinsicInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsADbgInfoIntrinsic", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsADbgInfoIntrinsic(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsADbgDeclareInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsADbgDeclareInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMemIntrinsic", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMemIntrinsic(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMemCpyInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMemCpyInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMemMoveInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMemMoveInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMemSetInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMemSetInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACmpInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACmpInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFCmpInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFCmpInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAICmpInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAICmpInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAExtractElementInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAExtractElementInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAGetElementPtrInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAGetElementPtrInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAInsertElementInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAInsertElementInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAInsertValueInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAInsertValueInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsALandingPadInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsALandingPadInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAPHINode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAPHINode(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsASelectInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsASelectInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAShuffleVectorInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAShuffleVectorInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAStoreInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAStoreInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsATerminatorInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsATerminatorInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsABranchInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsABranchInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAIndirectBrInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAIndirectBrInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAInvokeInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAInvokeInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAReturnInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAReturnInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsASwitchInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsASwitchInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAUnreachableInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAUnreachableInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAResumeInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAResumeInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACleanupReturnInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACleanupReturnInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACatchReturnInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACatchReturnInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFuncletPadInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFuncletPadInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACatchPadInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACatchPadInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACleanupPadInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACleanupPadInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAUnaryInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAUnaryInstruction(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAAllocaInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAAllocaInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsACastInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsACastInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAAddrSpaceCastInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAAddrSpaceCastInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsABitCastInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsABitCastInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFPExtInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFPExtInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFPToSIInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFPToSIInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFPToUIInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFPToUIInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAFPTruncInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAFPTruncInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAIntToPtrInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAIntToPtrInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAPtrToIntInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAPtrToIntInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsASExtInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsASExtInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsASIToFPInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsASIToFPInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsATruncInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsATruncInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAUIToFPInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAUIToFPInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAZExtInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAZExtInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAExtractValueInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAExtractValueInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsALoadInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsALoadInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAVAArgInst", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAVAArgInst(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMDNode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMDNode(LLVMValueRef val); | |
[DllImport(DLL, EntryPoint = "LLVMIsAMDString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef IsAMDString(LLVMValueRef val); | |
/// <summary> | |
/// const char *LLVMGetValueName(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMGetValueName2 instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetValueName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetValueName(LLVMValueRef val); | |
/// <summary> | |
/// void LLVMSetValueName(LLVMValueRef Val, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMSetValueName2 instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetValueName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetValueName(LLVMValueRef val, string name); | |
/// <summary> | |
/// LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the first use of a value.</para> | |
///<para> Uses are obtained in an iterator fashion. First, call this function to obtain a reference to the first use. Then, call LLVMGetNextUse() on that instance and all subsequently obtained instances until LLVMGetNextUse() returns NULL.</para> | |
///<para> llvm::Value::use_begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstUse", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMUseRef GetFirstUse(LLVMValueRef val); | |
/// <summary> | |
/// LLVMUseRef LLVMGetNextUse(LLVMUseRef U) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the next use of a value.</para> | |
///<para> This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextUse", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMUseRef GetNextUse(LLVMUseRef u); | |
/// <summary> | |
/// LLVMValueRef LLVMGetUser(LLVMUseRef U) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the user value for a user.</para> | |
///<para> The returned value corresponds to a llvm::User type.</para> | |
///<para> llvm::Use::getUser()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetUser", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetUser(LLVMUseRef u); | |
/// <summary> | |
/// LLVMValueRef LLVMGetUsedValue(LLVMUseRef U) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the value this use corresponds to.</para> | |
///<para> llvm::Use::get().</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetUsedValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetUsedValue(LLVMUseRef u); | |
/// <summary> | |
/// LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an operand at a specific index in a llvm::User value.</para> | |
///<para> llvm::User::getOperand()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetOperand", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetOperand(LLVMValueRef val, uint index); | |
/// <summary> | |
/// LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the use of an operand at a specific index in a llvm::User value.</para> | |
///<para> llvm::User::getOperandUse()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetOperandUse", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMUseRef GetOperandUse(LLVMValueRef val, uint index); | |
/// <summary> | |
/// void LLVMSetOperand(LLVMValueRef User, unsigned int Index, LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Set an operand at a specific index in a llvm::User value.</para> | |
///<para> llvm::User::setOperand()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetOperand", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetOperand(LLVMValueRef user, uint index, LLVMValueRef val); | |
/// <summary> | |
/// int LLVMGetNumOperands(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of operands in a llvm::User value.</para> | |
///<para> llvm::User::getNumOperands()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int GetNumOperands(LLVMValueRef val); | |
/// <summary> | |
/// LLVMValueRef LLVMConstNull(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value referring to the null instance of a type.</para> | |
///<para> llvm::Constant::getNullValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNull(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value referring to the instance of a type consisting of all ones.</para> | |
///<para> This is only valid for integer types.</para> | |
///<para> llvm::Constant::getAllOnesValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstAllOnes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstAllOnes(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value referring to an undefined value of a type.</para> | |
///<para> llvm::UndefValue::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetUndef", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetUndef(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMBool LLVMIsNull(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether a value instance is null.</para> | |
///<para> llvm::Constant::isNullValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsNull(LLVMValueRef val); | |
/// <summary> | |
/// LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant that is a constant pointer pointing to NULL for a specified type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstPointerNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstPointerNull(LLVMTypeRef ty); | |
/// <summary> | |
/// LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, | |
/// LLVMBool SignExtend) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value for an integer type.</para> | |
///<para> Integer type to obtain value of. </para> | |
///<para> The value the returned instance should refer to. </para> | |
///<para> Whether to sign extend the produced value.</para> | |
///<para> The returned value corresponds to a llvm::ConstantInt.</para> | |
///<para> llvm::ConstantInt::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstInt(LLVMTypeRef intTy, ulong n, LLVMBool signExtend); | |
/// <summary> | |
/// LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy, | |
/// unsigned int NumWords, | |
/// const uint64_t Words[]) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value for an integer of arbitrary precision.</para> | |
///<para> llvm::ConstantInt::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstIntOfArbitraryPrecision", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstIntOfArbitraryPrecision(LLVMTypeRef intTy, uint numWords, ulong* words); | |
/// <summary> | |
/// LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text, | |
/// uint8_t Radix) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value for an integer parsed from a string.</para> | |
///<para> A similar API, LLVMConstIntOfStringAndSize is also available. If the string's length is available, it is preferred to call that function instead.</para> | |
///<para> llvm::ConstantInt::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstIntOfString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstIntOfString(LLVMTypeRef intTy, string text, byte radix); | |
/// <summary> | |
/// LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text, | |
/// unsigned int SLen, uint8_t Radix) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value for an integer parsed from a string with specified length.</para> | |
///<para> llvm::ConstantInt::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstIntOfStringAndSize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstIntOfStringAndSize(LLVMTypeRef intTy, string text, uint sLen, byte radix); | |
/// <summary> | |
/// LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant value referring to a double floating point value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstReal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstReal(LLVMTypeRef realTy, double n); | |
/// <summary> | |
/// LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant for a floating point value parsed from a string.</para> | |
///<para> A similar API, LLVMConstRealOfStringAndSize is also available. It should be used if the input string's length is known.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstRealOfString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstRealOfString(LLVMTypeRef realTy, string text); | |
/// <summary> | |
/// LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char *Text, | |
/// unsigned int SLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a constant for a floating point value parsed from a string.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstRealOfStringAndSize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstRealOfStringAndSize(LLVMTypeRef realTy, string text, uint sLen); | |
/// <summary> | |
/// unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the zero extended value for an integer constant value.</para> | |
///<para> llvm::ConstantInt::getZExtValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstIntGetZExtValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong ConstIntGetZExtValue(LLVMValueRef constantVal); | |
/// <summary> | |
/// long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the sign extended value for an integer constant value.</para> | |
///<para> llvm::ConstantInt::getSExtValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstIntGetSExtValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern long ConstIntGetSExtValue(LLVMValueRef constantVal); | |
/// <summary> | |
/// double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the double value for an floating point constant value. losesInfo indicates if some precision was lost in the conversion.</para> | |
///<para> llvm::ConstantFP::getDoubleValue</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstRealGetDouble", CallingConvention=CallingConvention.Cdecl)] | |
public static extern double ConstRealGetDouble(LLVMValueRef constantVal, LLVMBool* losesInfo); | |
/// <summary> | |
/// LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, | |
/// unsigned int Length, | |
/// LLVMBool DontNullTerminate) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a ConstantDataSequential and initialize it with a string.</para> | |
///<para> llvm::ConstantDataArray::getString()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstStringInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstStringInContext(LLVMContextRef c, string str, uint length, LLVMBool dontNullTerminate); | |
/// <summary> | |
/// LLVMValueRef LLVMConstString(const char *Str, unsigned int Length, | |
/// LLVMBool DontNullTerminate) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a ConstantDataSequential with string content in the global context.</para> | |
///<para> This is the same as LLVMConstStringInContext except it operates on the global context.</para> | |
///<para> LLVMConstStringInContext() </para> | |
///<para> llvm::ConstantDataArray::getString()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstString(string str, uint length, LLVMBool dontNullTerminate); | |
/// <summary> | |
/// LLVMBool LLVMIsConstantString(LLVMValueRef c) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns true if the specified constant is an array of i8.</para> | |
///<para> ConstantDataSequential::getAsString()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsConstantString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsConstantString(LLVMValueRef c); | |
/// <summary> | |
/// const char *LLVMGetAsString(LLVMValueRef c, size_t *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the given constant data sequential as a string.</para> | |
///<para> ConstantDataSequential::getAsString()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetAsString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetAsString(LLVMValueRef c, out UIntPtr length); | |
/// <summary> | |
/// LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, | |
/// LLVMValueRef *ConstantVals, | |
/// unsigned int Count, LLVMBool Packed) | |
/// </summary> | |
/// <remarks> | |
///<para> Create an anonymous ConstantStruct with the specified values.</para> | |
///<para> llvm::ConstantStruct::getAnon()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstStructInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstStructInContext(LLVMContextRef c, LLVMValueRef* constantVals, uint count, LLVMBool packed); | |
/// <summary> | |
/// LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned int Count, | |
/// LLVMBool Packed) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a ConstantStruct in the global Context.</para> | |
///<para> This is the same as LLVMConstStructInContext except it operates on the global Context.</para> | |
///<para> LLVMConstStructInContext()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstStruct", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstStruct(LLVMValueRef* constantVals, uint count, LLVMBool packed); | |
/// <summary> | |
/// LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, | |
/// unsigned int Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a ConstantArray from values.</para> | |
///<para> llvm::ConstantArray::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstArray", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstArray(LLVMTypeRef elementTy, LLVMValueRef* constantVals, uint length); | |
/// <summary> | |
/// LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, | |
/// LLVMValueRef *ConstantVals, | |
/// unsigned int Count) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a non-anonymous ConstantStruct from values.</para> | |
///<para> llvm::ConstantStruct::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstNamedStruct", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNamedStruct(LLVMTypeRef structTy, LLVMValueRef* constantVals, uint count); | |
/// <summary> | |
/// LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned int idx) | |
/// </summary> | |
/// <remarks> | |
///<para> Get an element at specified index as a constant.</para> | |
///<para> ConstantDataSequential::getElementAsConstant()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetElementAsConstant", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetElementAsConstant(LLVMValueRef c, uint idx); | |
/// <summary> | |
/// LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, | |
/// unsigned int Size) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a ConstantVector from values.</para> | |
///<para> llvm::ConstantVector::get()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstVector", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstVector(LLVMValueRef* scalarConstantVals, uint size); | |
/// <summary> | |
/// LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal) | |
/// </summary> | |
/// <remarks> | |
///<para> Functions in this group correspond to APIs on llvm::ConstantExpr.</para> | |
///<para> llvm::ConstantExpr.</para> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetConstOpcode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMOpcode GetConstOpcode(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMAlignOf", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AlignOf(LLVMTypeRef ty); | |
[DllImport(DLL, EntryPoint = "LLVMSizeOf", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef SizeOf(LLVMTypeRef ty); | |
[DllImport(DLL, EntryPoint = "LLVMConstNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNeg(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMConstNSWNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNSWNeg(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMConstNUWNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNUWNeg(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMConstFNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFNeg(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMConstNot", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNot(LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMConstAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstAdd(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNSWAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNSWAdd(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNUWAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNUWAdd(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFAdd(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSub(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNSWSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNSWSub(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNUWSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNUWSub(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFSub(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstMul(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNSWMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNSWMul(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstNUWMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstNUWMul(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFMul(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstUDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstUDiv(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstExactUDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstExactUDiv(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstSDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSDiv(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstExactSDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstExactSDiv(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFDiv(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstURem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstURem(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstSRem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSRem(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFRem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFRem(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstAnd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstAnd(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstOr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstOr(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstXor", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstXor(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstICmp", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstICmp(LLVMIntPredicate predicate, LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstFCmp", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFCmp(LLVMRealPredicate predicate, LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstShl", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstShl(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstLShr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstLShr(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstAShr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstAShr(LLVMValueRef lHSConstant, LLVMValueRef rHSConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstGEP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstGEP(LLVMValueRef constantVal, LLVMValueRef* constantIndices, uint numIndices); | |
[DllImport(DLL, EntryPoint = "LLVMConstInBoundsGEP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstInBoundsGEP(LLVMValueRef constantVal, LLVMValueRef* constantIndices, uint numIndices); | |
[DllImport(DLL, EntryPoint = "LLVMConstTrunc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstTrunc(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstSExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSExt(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstZExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstZExt(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstFPTrunc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFPTrunc(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstFPExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFPExt(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstUIToFP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstUIToFP(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstSIToFP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSIToFP(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstFPToUI", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFPToUI(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstFPToSI", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFPToSI(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstPtrToInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstPtrToInt(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstIntToPtr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstIntToPtr(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstBitCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstAddrSpaceCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstAddrSpaceCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstZExtOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstZExtOrBitCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstSExtOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSExtOrBitCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstTruncOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstTruncOrBitCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstPointerCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstPointerCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstIntCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstIntCast(LLVMValueRef constantVal, LLVMTypeRef toType, LLVMBool isSigned); | |
[DllImport(DLL, EntryPoint = "LLVMConstFPCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstFPCast(LLVMValueRef constantVal, LLVMTypeRef toType); | |
[DllImport(DLL, EntryPoint = "LLVMConstSelect", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstSelect(LLVMValueRef constantCondition, LLVMValueRef constantIfTrue, LLVMValueRef constantIfFalse); | |
[DllImport(DLL, EntryPoint = "LLVMConstExtractElement", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstExtractElement(LLVMValueRef vectorConstant, LLVMValueRef indexConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstInsertElement", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstInsertElement(LLVMValueRef vectorConstant, LLVMValueRef elementValueConstant, LLVMValueRef indexConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstShuffleVector", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstShuffleVector(LLVMValueRef vectorAConstant, LLVMValueRef vectorBConstant, LLVMValueRef maskConstant); | |
[DllImport(DLL, EntryPoint = "LLVMConstExtractValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstExtractValue(LLVMValueRef aggConstant, out uint idxList, uint numIdx); | |
[DllImport(DLL, EntryPoint = "LLVMConstInsertValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstInsertValue(LLVMValueRef aggConstant, LLVMValueRef elementValueConstant, out uint idxList, uint numIdx); | |
[DllImport(DLL, EntryPoint = "LLVMBlockAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BlockAddress(LLVMValueRef f, LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, | |
/// const char *Constraints, | |
/// LLVMBool HasSideEffects, LLVMBool IsAlignStack) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMGetInlineAsm instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMConstInlineAsm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef ConstInlineAsm(LLVMTypeRef ty, string asmString, string constraints, LLVMBool hasSideEffects, LLVMBool isAlignStack); | |
/// <summary> | |
/// LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global) | |
/// </summary> | |
/// <remarks> | |
///<para> This group contains functions that operate on global values. Functions in this group relate to functions in the llvm::GlobalValue class tree.</para> | |
///<para> llvm::GlobalValue</para> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetGlobalParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleRef GetGlobalParent(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMIsDeclaration", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsDeclaration(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMGetLinkage", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMLinkage GetLinkage(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMSetLinkage", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetLinkage(LLVMValueRef @global, LLVMLinkage linkage); | |
[DllImport(DLL, EntryPoint = "LLVMGetSection", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetSection(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMSetSection", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetSection(LLVMValueRef @global, string section); | |
[DllImport(DLL, EntryPoint = "LLVMGetVisibility", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMVisibility GetVisibility(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMSetVisibility", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetVisibility(LLVMValueRef @global, LLVMVisibility viz); | |
[DllImport(DLL, EntryPoint = "LLVMGetDLLStorageClass", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDLLStorageClass GetDLLStorageClass(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMSetDLLStorageClass", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetDLLStorageClass(LLVMValueRef @global, LLVMDLLStorageClass @class); | |
[DllImport(DLL, EntryPoint = "LLVMGetUnnamedAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMUnnamedAddr GetUnnamedAddress(LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMSetUnnamedAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetUnnamedAddress(LLVMValueRef @global, LLVMUnnamedAddr unnamedAddr); | |
/// <summary> | |
/// LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMGetUnnamedAddress instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMHasUnnamedAddr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool HasUnnamedAddr(LLVMValueRef @global); | |
/// <summary> | |
/// void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMSetUnnamedAddress instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetUnnamedAddr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetUnnamedAddr(LLVMValueRef @global, LLVMBool hasUnnamedAddr); | |
/// <summary> | |
/// unsigned int LLVMGetAlignment(LLVMValueRef V) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the preferred alignment of the value. </para> | |
///<para> llvm::AllocaInst::getAlignment() </para> | |
///<para> llvm::LoadInst::getAlignment() </para> | |
///<para> llvm::StoreInst::getAlignment() </para> | |
///<para> llvm::GlobalValue::getAlignment()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetAlignment", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetAlignment(LLVMValueRef v); | |
/// <summary> | |
/// void LLVMSetAlignment(LLVMValueRef V, unsigned int Bytes) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the preferred alignment of the value. </para> | |
///<para> llvm::AllocaInst::setAlignment() </para> | |
///<para> llvm::LoadInst::setAlignment() </para> | |
///<para> llvm::StoreInst::setAlignment() </para> | |
///<para> llvm::GlobalValue::setAlignment()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetAlignment", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetAlignment(LLVMValueRef v, uint bytes); | |
/// <summary> | |
/// LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> This group contains functions that operate on global variable values.</para> | |
///<para> llvm::GlobalVariable</para> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AddGlobal(LLVMModuleRef m, LLVMTypeRef ty, string name); | |
[DllImport(DLL, EntryPoint = "LLVMAddGlobalInAddressSpace", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AddGlobalInAddressSpace(LLVMModuleRef m, LLVMTypeRef ty, string name, uint addressSpace); | |
[DllImport(DLL, EntryPoint = "LLVMGetNamedGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNamedGlobal(LLVMModuleRef m, string name); | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetFirstGlobal(LLVMModuleRef m); | |
[DllImport(DLL, EntryPoint = "LLVMGetLastGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetLastGlobal(LLVMModuleRef m); | |
[DllImport(DLL, EntryPoint = "LLVMGetNextGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNextGlobal(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPreviousGlobal(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMDeleteGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DeleteGlobal(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMGetInitializer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetInitializer(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMSetInitializer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetInitializer(LLVMValueRef globalVar, LLVMValueRef constantVal); | |
[DllImport(DLL, EntryPoint = "LLVMIsThreadLocal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsThreadLocal(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMSetThreadLocal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetThreadLocal(LLVMValueRef globalVar, LLVMBool isThreadLocal); | |
[DllImport(DLL, EntryPoint = "LLVMIsGlobalConstant", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsGlobalConstant(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMSetGlobalConstant", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetGlobalConstant(LLVMValueRef globalVar, LLVMBool isConstant); | |
[DllImport(DLL, EntryPoint = "LLVMGetThreadLocalMode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMThreadLocalMode GetThreadLocalMode(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMSetThreadLocalMode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetThreadLocalMode(LLVMValueRef globalVar, LLVMThreadLocalMode mode); | |
[DllImport(DLL, EntryPoint = "LLVMIsExternallyInitialized", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsExternallyInitialized(LLVMValueRef globalVar); | |
[DllImport(DLL, EntryPoint = "LLVMSetExternallyInitialized", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetExternallyInitialized(LLVMValueRef globalVar, LLVMBool isExtInit); | |
/// <summary> | |
/// LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, | |
/// const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> This group contains function that operate on global alias values.</para> | |
///<para> llvm::GlobalAlias</para> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AddAlias(LLVMModuleRef m, LLVMTypeRef ty, LLVMValueRef aliasee, string name); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M, const char *Name, | |
/// size_t NameLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a GlobalAlias value from a Module by its name.</para> | |
///<para> The returned value corresponds to a llvm::GlobalAlias value.</para> | |
///<para> llvm::Module::getNamedAlias()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNamedGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNamedGlobalAlias(LLVMModuleRef m, string name, UIntPtr nameLen); | |
/// <summary> | |
/// LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an iterator to the first GlobalAlias in a Module.</para> | |
///<para> llvm::Module::alias_begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetFirstGlobalAlias(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an iterator to the last GlobalAlias in a Module.</para> | |
///<para> llvm::Module::alias_end()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetLastGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetLastGlobalAlias(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA) | |
/// </summary> | |
/// <remarks> | |
///<para> Advance a GlobalAlias iterator to the next GlobalAlias.</para> | |
///<para> Returns NULL if the iterator was already at the end and there are no more global aliases.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNextGlobalAlias(LLVMValueRef gA); | |
/// <summary> | |
/// LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA) | |
/// </summary> | |
/// <remarks> | |
///<para> Decrement a GlobalAlias iterator to the previous GlobalAlias.</para> | |
///<para> Returns NULL if the iterator was already at the beginning and there are no previous global aliases.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousGlobalAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPreviousGlobalAlias(LLVMValueRef gA); | |
/// <summary> | |
/// LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias) | |
/// </summary> | |
/// <remarks> | |
///<para> Retrieve the target value of an alias.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAliasGetAliasee", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef AliasGetAliasee(LLVMValueRef alias); | |
/// <summary> | |
/// void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the target value of an alias.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAliasSetAliasee", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AliasSetAliasee(LLVMValueRef alias, LLVMValueRef aliasee); | |
/// <summary> | |
/// void LLVMDeleteFunction(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Remove a function from its containing module and deletes it.</para> | |
///<para> llvm::Function::eraseFromParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDeleteFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DeleteFunction(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Check whether the given function has a personality function.</para> | |
///<para> llvm::Function::hasPersonalityFn()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMHasPersonalityFn", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool HasPersonalityFn(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the personality function attached to the function.</para> | |
///<para> llvm::Function::getPersonalityFn()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPersonalityFn", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPersonalityFn(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the personality function attached to the function.</para> | |
///<para> llvm::Function::setPersonalityFn()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetPersonalityFn", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetPersonalityFn(LLVMValueRef fn, LLVMValueRef personalityFn); | |
/// <summary> | |
/// unsigned int LLVMGetIntrinsicID(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the ID number from a function instance.</para> | |
///<para> llvm::Function::getIntrinsicID()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetIntrinsicID", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetIntrinsicID(LLVMValueRef fn); | |
/// <summary> | |
/// unsigned int LLVMGetFunctionCallConv(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the calling function of a function.</para> | |
///<para> The returned value corresponds to the LLVMCallConv enumeration.</para> | |
///<para> llvm::Function::getCallingConv()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFunctionCallConv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetFunctionCallConv(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned int CC) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the calling convention of a function.</para> | |
///<para> Function to operate on </para> | |
///<para> LLVMCallConv to set calling convention to</para> | |
///<para> llvm::Function::setCallingConv()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetFunctionCallConv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetFunctionCallConv(LLVMValueRef fn, uint cC); | |
/// <summary> | |
/// const char *LLVMGetGC(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the name of the garbage collector to use during code generation.</para> | |
///<para> llvm::Function::getGC()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetGC", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetGC(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMSetGC(LLVMValueRef Fn, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Define the garbage collector to use during code generation.</para> | |
///<para> llvm::Function::setGC()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetGC", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetGC(LLVMValueRef fn, string name); | |
/// <summary> | |
/// void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, | |
/// LLVMAttributeRef A) | |
/// </summary> | |
/// <remarks> | |
///<para> Add an attribute to a function.</para> | |
///<para> llvm::Function::addAttribute()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddAttributeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddAttributeAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, LLVMAttributeRef a); | |
[DllImport(DLL, EntryPoint = "LLVMGetAttributeCountAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetAttributeCountAtIndex(LLVMValueRef f, LLVMAttributeIndex idx); | |
[DllImport(DLL, EntryPoint = "LLVMGetAttributesAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetAttributesAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, LLVMAttributeRef* attrs); | |
[DllImport(DLL, EntryPoint = "LLVMGetEnumAttributeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef GetEnumAttributeAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, uint kindID); | |
[DllImport(DLL, EntryPoint = "LLVMGetStringAttributeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef GetStringAttributeAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, string k, uint kLen); | |
[DllImport(DLL, EntryPoint = "LLVMRemoveEnumAttributeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RemoveEnumAttributeAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, uint kindID); | |
[DllImport(DLL, EntryPoint = "LLVMRemoveStringAttributeAtIndex", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RemoveStringAttributeAtIndex(LLVMValueRef f, LLVMAttributeIndex idx, string k, uint kLen); | |
/// <summary> | |
/// void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, | |
/// const char *V) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a target-dependent attribute to a function </para> | |
///<para> llvm::AttrBuilder::addAttribute()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddTargetDependentFunctionAttr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddTargetDependentFunctionAttr(LLVMValueRef fn, string a, string v); | |
/// <summary> | |
/// unsigned int LLVMCountParams(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of parameters in a function.</para> | |
///<para> llvm::Function::arg_size()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCountParams", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CountParams(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the parameters in a function.</para> | |
///<para> The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long. This array will be filled with LLVMValueRef instances which correspond to the parameters the function receives. Each LLVMValueRef corresponds to a llvm::Argument instance.</para> | |
///<para> llvm::Function::arg_begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetParams", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetParams(LLVMValueRef fn, LLVMValueRef* @params); | |
/// <summary> | |
/// LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the parameter at the specified index.</para> | |
///<para> Parameters are indexed from 0.</para> | |
///<para> llvm::Function::arg_begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetParam", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetParam(LLVMValueRef fn, uint index); | |
/// <summary> | |
/// LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the function to which this argument belongs.</para> | |
///<para> Unlike other functions in this group, this one takes an LLVMValueRef that corresponds to a llvm::Attribute.</para> | |
///<para> The returned LLVMValueRef is the llvm::Function to which this argument belongs.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetParamParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetParamParent(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the first parameter to a function.</para> | |
///<para> llvm::Function::arg_begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstParam", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetFirstParam(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the last parameter to a function.</para> | |
///<para> llvm::Function::arg_end()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetLastParam", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetLastParam(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the next parameter to a function.</para> | |
///<para> This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is actually a wrapped iterator) and obtains the next parameter from the underlying iterator.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextParam", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNextParam(LLVMValueRef arg); | |
/// <summary> | |
/// LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the previous parameter to a function.</para> | |
///<para> This is the opposite of LLVMGetNextParam().</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousParam", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPreviousParam(LLVMValueRef arg); | |
/// <summary> | |
/// void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned int Align) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the alignment for a function parameter.</para> | |
///<para> llvm::Argument::addAttr() </para> | |
///<para> llvm::AttrBuilder::addAlignmentAttr()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetParamAlignment", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetParamAlignment(LLVMValueRef arg, uint align); | |
/// <summary> | |
/// LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, | |
/// unsigned int SLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a MDString value from a context.</para> | |
///<para> The returned instance corresponds to the llvm::MDString class.</para> | |
///<para> The instance is specified by string data of a specified length. The string content is copied, so the backing memory can be freed after this function returns.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMDStringInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef MDStringInContext(LLVMContextRef c, string str, uint sLen); | |
/// <summary> | |
/// LLVMValueRef LLVMMDString(const char *Str, unsigned int SLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a MDString value from the global context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMDString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef MDString(string str, uint sLen); | |
/// <summary> | |
/// LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, | |
/// unsigned int Count) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a MDNode value from a context.</para> | |
///<para> The returned value corresponds to the llvm::MDNode class.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMDNodeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef MDNodeInContext(LLVMContextRef c, LLVMValueRef* vals, uint count); | |
/// <summary> | |
/// LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned int Count) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a MDNode value from the global context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMDNode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef MDNode(LLVMValueRef* vals, uint count); | |
/// <summary> | |
/// LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a Metadata as a Value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMetadataAsValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef MetadataAsValue(LLVMContextRef c, LLVMMetadataRef mD); | |
/// <summary> | |
/// LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain a Value as a Metadata.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMValueAsMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef ValueAsMetadata(LLVMValueRef val); | |
/// <summary> | |
/// const char *LLVMGetMDString(LLVMValueRef V, unsigned int *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the underlying string from a MDString value.</para> | |
///<para> Instance to obtain string from. </para> | |
///<para> Memory address which will hold length of returned string. </para> | |
///<para> String data in MDString.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetMDString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetMDString(LLVMValueRef v, out uint length); | |
/// <summary> | |
/// unsigned int LLVMGetMDNodeNumOperands(LLVMValueRef V) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of operands from an MDNode value.</para> | |
///<para> MDNode to get number of operands from. </para> | |
///<para> Number of operands of the MDNode.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetMDNodeNumOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetMDNodeNumOperands(LLVMValueRef v); | |
/// <summary> | |
/// void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the given MDNode's operands.</para> | |
///<para> MDNode to get the operands from. </para> | |
///<para> Destination array for operands.</para> | |
///<para> The passed LLVMValueRef pointer should point to enough memory to hold all of the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the MDNode's operands.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetMDNodeOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetMDNodeOperands(LLVMValueRef v, LLVMValueRef* dest); | |
/// <summary> | |
/// LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Convert a basic block instance to a value type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBasicBlockAsValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BasicBlockAsValue(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether an LLVMValueRef is itself a basic block.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMValueIsBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool ValueIsBasicBlock(LLVMValueRef val); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Convert an LLVMValueRef to an LLVMBasicBlockRef instance.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMValueAsBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef ValueAsBasicBlock(LLVMValueRef val); | |
/// <summary> | |
/// const char *LLVMGetBasicBlockName(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the string name of a basic block.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBasicBlockName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetBasicBlockName(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the function to which a basic block belongs.</para> | |
///<para> llvm::BasicBlock::getParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBasicBlockParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetBasicBlockParent(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the terminator instruction for a basic block.</para> | |
///<para> If the basic block does not have a terminator (it is not well-formed if it doesn't), then NULL is returned.</para> | |
///<para> The returned LLVMValueRef corresponds to a llvm::TerminatorInst.</para> | |
///<para> llvm::BasicBlock::getTerminator()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBasicBlockTerminator", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetBasicBlockTerminator(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// unsigned int LLVMCountBasicBlocks(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of basic blocks in a function.</para> | |
///<para> Function value to operate on.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCountBasicBlocks", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CountBasicBlocks(LLVMValueRef fn); | |
/// <summary> | |
/// void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain all of the basic blocks in a function.</para> | |
///<para> This operates on a function value. The BasicBlocks parameter is a pointer to a pre-allocated array of LLVMBasicBlockRef of at least LLVMCountBasicBlocks() in length. This array is populated with LLVMBasicBlockRef instances.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetBasicBlocks", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetBasicBlocks(LLVMValueRef fn, LLVMBasicBlockRef* basicBlocks); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the first basic block in a function.</para> | |
///<para> The returned basic block can be used as an iterator. You will likely eventually call into LLVMGetNextBasicBlock() with it.</para> | |
///<para> llvm::Function::begin()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetFirstBasicBlock(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the last basic block in a function.</para> | |
///<para> llvm::Function::end()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetLastBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetLastBasicBlock(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Advance a basic block iterator.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetNextBasicBlock(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Go backwards in a basic block iterator.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetPreviousBasicBlock(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the basic block that corresponds to the entry point of a function.</para> | |
///<para> llvm::Function::getEntryBlock()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetEntryBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetEntryBasicBlock(LLVMValueRef fn); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C, | |
/// LLVMValueRef Fn, | |
/// const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Append a basic block to the end of a function.</para> | |
///<para> llvm::BasicBlock::Create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAppendBasicBlockInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef AppendBasicBlockInContext(LLVMContextRef c, LLVMValueRef fn, string name); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef Fn, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Append a basic block to the end of a function using the global context.</para> | |
///<para> llvm::BasicBlock::Create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAppendBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef AppendBasicBlock(LLVMValueRef fn, string name); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMInsertBasicBlockInContext(LLVMContextRef C, | |
/// LLVMBasicBlockRef BB, | |
/// const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Insert a basic block in a function before another basic block.</para> | |
///<para> The function to add to is determined by the function of the passed basic block.</para> | |
///<para> llvm::BasicBlock::Create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInsertBasicBlockInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef InsertBasicBlockInContext(LLVMContextRef c, LLVMBasicBlockRef bB, string name); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, | |
/// const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Insert a basic block in a function using the global context.</para> | |
///<para> llvm::BasicBlock::Create()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInsertBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef InsertBasicBlock(LLVMBasicBlockRef insertBeforeBB, string name); | |
/// <summary> | |
/// void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Remove a basic block from a function and delete it.</para> | |
///<para> This deletes the basic block from its containing function and deletes the basic block itself.</para> | |
///<para> llvm::BasicBlock::eraseFromParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDeleteBasicBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DeleteBasicBlock(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Remove a basic block from a function.</para> | |
///<para> This deletes the basic block from its containing function but keep the basic block alive.</para> | |
///<para> llvm::BasicBlock::removeFromParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMRemoveBasicBlockFromParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RemoveBasicBlockFromParent(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) | |
/// </summary> | |
/// <remarks> | |
///<para> Move a basic block to before another one.</para> | |
///<para> llvm::BasicBlock::moveBefore()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMoveBasicBlockBefore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void MoveBasicBlockBefore(LLVMBasicBlockRef bB, LLVMBasicBlockRef movePos); | |
/// <summary> | |
/// void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) | |
/// </summary> | |
/// <remarks> | |
///<para> Move a basic block to after another one.</para> | |
///<para> llvm::BasicBlock::moveAfter()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMoveBasicBlockAfter", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void MoveBasicBlockAfter(LLVMBasicBlockRef bB, LLVMBasicBlockRef movePos); | |
/// <summary> | |
/// LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the first instruction in a basic block.</para> | |
///<para> The returned LLVMValueRef corresponds to a llvm::Instruction instance.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFirstInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetFirstInstruction(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the last instruction in a basic block.</para> | |
///<para> The returned LLVMValueRef corresponds to an LLVM:Instruction.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetLastInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetLastInstruction(LLVMBasicBlockRef bB); | |
/// <summary> | |
/// int LLVMHasMetadata(LLVMValueRef Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Determine whether an instruction has any metadata attached.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMHasMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int HasMetadata(LLVMValueRef val); | |
/// <summary> | |
/// LLVMValueRef LLVMGetMetadata(LLVMValueRef Val, unsigned int KindID) | |
/// </summary> | |
/// <remarks> | |
///<para> Return metadata associated with an instruction value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetMetadata(LLVMValueRef val, uint kindID); | |
/// <summary> | |
/// void LLVMSetMetadata(LLVMValueRef Val, unsigned int KindID, LLVMValueRef Node) | |
/// </summary> | |
/// <remarks> | |
///<para> Set metadata associated with an instruction value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetMetadata", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetMetadata(LLVMValueRef val, uint kindID, LLVMValueRef node); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the basic block to which an instruction belongs.</para> | |
///<para> llvm::Instruction::getParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetInstructionParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetInstructionParent(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the instruction that occurs after the one specified.</para> | |
///<para> The next instruction will be from the same basic block.</para> | |
///<para> If this is the last instruction in a basic block, NULL will be returned.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNextInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetNextInstruction(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the instruction that occurred before this one.</para> | |
///<para> If the instruction is the first instruction in a basic block, NULL will be returned.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetPreviousInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetPreviousInstruction(LLVMValueRef inst); | |
/// <summary> | |
/// void LLVMInstructionRemoveFromParent(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Remove and delete an instruction.</para> | |
///<para> The instruction specified is removed from its containing building block but is kept alive.</para> | |
///<para> llvm::Instruction::removeFromParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInstructionRemoveFromParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InstructionRemoveFromParent(LLVMValueRef inst); | |
/// <summary> | |
/// void LLVMInstructionEraseFromParent(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Remove and delete an instruction.</para> | |
///<para> The instruction specified is removed from its containing building block and then deleted.</para> | |
///<para> llvm::Instruction::eraseFromParent()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInstructionEraseFromParent", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InstructionEraseFromParent(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the code opcode for an individual instruction.</para> | |
///<para> llvm::Instruction::getOpCode()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetInstructionOpcode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMOpcode GetInstructionOpcode(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the predicate of an instruction.</para> | |
///<para> This is only valid for instructions that correspond to llvm::ICmpInst or llvm::ConstantExpr whose opcode is llvm::Instruction::ICmp.</para> | |
///<para> llvm::ICmpInst::getPredicate()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetICmpPredicate", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMIntPredicate GetICmpPredicate(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the float predicate of an instruction.</para> | |
///<para> This is only valid for instructions that correspond to llvm::FCmpInst or llvm::ConstantExpr whose opcode is llvm::Instruction::FCmp.</para> | |
///<para> llvm::FCmpInst::getPredicate()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetFCmpPredicate", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMRealPredicate GetFCmpPredicate(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a copy of 'this' instruction that is identical in all ways except the following: * The instruction has no parent * The instruction has no name</para> | |
///<para> llvm::Instruction::clone()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInstructionClone", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef InstructionClone(LLVMValueRef inst); | |
/// <summary> | |
/// unsigned int LLVMGetNumArgOperands(LLVMValueRef Instr) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the argument count for a call instruction.</para> | |
///<para> This expects an LLVMValueRef that corresponds to a llvm::CallInst, llvm::InvokeInst, or llvm:FuncletPadInst.</para> | |
///<para> llvm::CallInst::getNumArgOperands() </para> | |
///<para> llvm::InvokeInst::getNumArgOperands() </para> | |
///<para> llvm::FuncletPadInst::getNumArgOperands()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumArgOperands", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumArgOperands(LLVMValueRef instr); | |
/// <summary> | |
/// void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned int CC) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the calling convention for a call instruction.</para> | |
///<para> This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.</para> | |
///<para> llvm::CallInst::setCallingConv() </para> | |
///<para> llvm::InvokeInst::setCallingConv()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetInstructionCallConv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetInstructionCallConv(LLVMValueRef instr, uint cC); | |
/// <summary> | |
/// unsigned int LLVMGetInstructionCallConv(LLVMValueRef Instr) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the calling convention for a call instruction.</para> | |
///<para> This is the opposite of LLVMSetInstructionCallConv(). Reads its usage.</para> | |
///<para> LLVMSetInstructionCallConv()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetInstructionCallConv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetInstructionCallConv(LLVMValueRef instr); | |
[DllImport(DLL, EntryPoint = "LLVMSetInstrParamAlignment", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetInstrParamAlignment(LLVMValueRef instr, uint index, uint align); | |
[DllImport(DLL, EntryPoint = "LLVMAddCallSiteAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddCallSiteAttribute(LLVMValueRef c, LLVMAttributeIndex idx, LLVMAttributeRef a); | |
[DllImport(DLL, EntryPoint = "LLVMGetCallSiteAttributeCount", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetCallSiteAttributeCount(LLVMValueRef c, LLVMAttributeIndex idx); | |
[DllImport(DLL, EntryPoint = "LLVMGetCallSiteAttributes", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetCallSiteAttributes(LLVMValueRef c, LLVMAttributeIndex idx, LLVMAttributeRef* attrs); | |
[DllImport(DLL, EntryPoint = "LLVMGetCallSiteEnumAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef GetCallSiteEnumAttribute(LLVMValueRef c, LLVMAttributeIndex idx, uint kindID); | |
[DllImport(DLL, EntryPoint = "LLVMGetCallSiteStringAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAttributeRef GetCallSiteStringAttribute(LLVMValueRef c, LLVMAttributeIndex idx, string k, uint kLen); | |
[DllImport(DLL, EntryPoint = "LLVMRemoveCallSiteEnumAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RemoveCallSiteEnumAttribute(LLVMValueRef c, LLVMAttributeIndex idx, uint kindID); | |
[DllImport(DLL, EntryPoint = "LLVMRemoveCallSiteStringAttribute", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RemoveCallSiteStringAttribute(LLVMValueRef c, LLVMAttributeIndex idx, string k, uint kLen); | |
/// <summary> | |
/// LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the pointer to the function invoked by this instruction.</para> | |
///<para> This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.</para> | |
///<para> llvm::CallInst::getCalledValue() </para> | |
///<para> llvm::InvokeInst::getCalledValue()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetCalledValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetCalledValue(LLVMValueRef instr); | |
/// <summary> | |
/// LLVMBool LLVMIsTailCall(LLVMValueRef CallInst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain whether a call instruction is a tail call.</para> | |
///<para> This only works on llvm::CallInst instructions.</para> | |
///<para> llvm::CallInst::isTailCall()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsTailCall", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsTailCall(LLVMValueRef callInst); | |
/// <summary> | |
/// void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall) | |
/// </summary> | |
/// <remarks> | |
///<para> Set whether a call instruction is a tail call.</para> | |
///<para> This only works on llvm::CallInst instructions.</para> | |
///<para> llvm::CallInst::setTailCall()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetTailCall", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetTailCall(LLVMValueRef callInst, LLVMBool isTailCall); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the normal destination basic block.</para> | |
///<para> This only works on llvm::InvokeInst instructions.</para> | |
///<para> llvm::InvokeInst::getNormalDest()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNormalDest", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetNormalDest(LLVMValueRef invokeInst); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the unwind destination basic block.</para> | |
///<para> Works on llvm::InvokeInst, llvm::CleanupReturnInst, and llvm::CatchSwitchInst instructions.</para> | |
///<para> llvm::InvokeInst::getUnwindDest() </para> | |
///<para> llvm::CleanupReturnInst::getUnwindDest() </para> | |
///<para> llvm::CatchSwitchInst::getUnwindDest()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetUnwindDest", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetUnwindDest(LLVMValueRef invokeInst); | |
/// <summary> | |
/// void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the normal destination basic block.</para> | |
///<para> This only works on llvm::InvokeInst instructions.</para> | |
///<para> llvm::InvokeInst::setNormalDest()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetNormalDest", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetNormalDest(LLVMValueRef invokeInst, LLVMBasicBlockRef b); | |
/// <summary> | |
/// void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the unwind destination basic block.</para> | |
///<para> Works on llvm::InvokeInst, llvm::CleanupReturnInst, and llvm::CatchSwitchInst instructions.</para> | |
///<para> llvm::InvokeInst::setUnwindDest() </para> | |
///<para> llvm::CleanupReturnInst::setUnwindDest() </para> | |
///<para> llvm::CatchSwitchInst::setUnwindDest()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetUnwindDest", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetUnwindDest(LLVMValueRef invokeInst, LLVMBasicBlockRef b); | |
/// <summary> | |
/// unsigned int LLVMGetNumSuccessors(LLVMValueRef Term) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the number of successors that this terminator has.</para> | |
///<para> llvm::TerminatorInst::getNumSuccessors</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumSuccessors", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumSuccessors(LLVMValueRef term); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned int i) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the specified successor.</para> | |
///<para> llvm::TerminatorInst::getSuccessor</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetSuccessor", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetSuccessor(LLVMValueRef term, uint i); | |
/// <summary> | |
/// void LLVMSetSuccessor(LLVMValueRef Term, unsigned int i, | |
/// LLVMBasicBlockRef block) | |
/// </summary> | |
/// <remarks> | |
///<para> Update the specified successor to point at the provided block.</para> | |
///<para> llvm::TerminatorInst::setSuccessor</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetSuccessor", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetSuccessor(LLVMValueRef term, uint i, LLVMBasicBlockRef block); | |
/// <summary> | |
/// LLVMBool LLVMIsConditional(LLVMValueRef Branch) | |
/// </summary> | |
/// <remarks> | |
///<para> Return if a branch is conditional.</para> | |
///<para> This only works on llvm::BranchInst instructions.</para> | |
///<para> llvm::BranchInst::isConditional</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsConditional", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsConditional(LLVMValueRef branch); | |
/// <summary> | |
/// LLVMValueRef LLVMGetCondition(LLVMValueRef Branch) | |
/// </summary> | |
/// <remarks> | |
///<para> Return the condition of a branch instruction.</para> | |
///<para> This only works on llvm::BranchInst instructions.</para> | |
///<para> llvm::BranchInst::getCondition</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetCondition", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetCondition(LLVMValueRef branch); | |
/// <summary> | |
/// void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the condition of a branch instruction.</para> | |
///<para> This only works on llvm::BranchInst instructions.</para> | |
///<para> llvm::BranchInst::setCondition</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetCondition", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetCondition(LLVMValueRef branch, LLVMValueRef cond); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the default destination basic block of a switch instruction.</para> | |
///<para> This only works on llvm::SwitchInst instructions.</para> | |
///<para> llvm::SwitchInst::getDefaultDest()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetSwitchDefaultDest", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetSwitchDefaultDest(LLVMValueRef switchInstr); | |
/// <summary> | |
/// LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the type that is being allocated by the alloca instruction.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetAllocatedType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef GetAllocatedType(LLVMValueRef alloca); | |
/// <summary> | |
/// LLVMBool LLVMIsInBounds(LLVMValueRef GEP) | |
/// </summary> | |
/// <remarks> | |
///<para> Check whether the given GEP instruction is inbounds.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsInBounds", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsInBounds(LLVMValueRef gEP); | |
/// <summary> | |
/// void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the given GEP instruction to be inbounds or not.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetIsInBounds", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetIsInBounds(LLVMValueRef gEP, LLVMBool inBounds); | |
/// <summary> | |
/// void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, | |
/// LLVMBasicBlockRef *IncomingBlocks, unsigned int Count) | |
/// </summary> | |
/// <remarks> | |
///<para> Add an incoming value to the end of a PHI list.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddIncoming", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddIncoming(LLVMValueRef phiNode, LLVMValueRef* incomingValues, LLVMBasicBlockRef* incomingBlocks, uint count); | |
/// <summary> | |
/// unsigned int LLVMCountIncoming(LLVMValueRef PhiNode) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of incoming basic blocks to a PHI node.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCountIncoming", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CountIncoming(LLVMValueRef phiNode); | |
/// <summary> | |
/// LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an incoming value to a PHI node as an LLVMValueRef.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetIncomingValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetIncomingValue(LLVMValueRef phiNode, uint index); | |
/// <summary> | |
/// LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned int Index) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetIncomingBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetIncomingBlock(LLVMValueRef phiNode, uint index); | |
/// <summary> | |
/// unsigned int LLVMGetNumIndices(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the number of indices. NB: This also works on GEP.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumIndices", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumIndices(LLVMValueRef inst); | |
/// <summary> | |
/// const unsigned int *LLVMGetIndices(LLVMValueRef Inst) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the indices as an array.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetIndices", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint* GetIndices(LLVMValueRef inst); | |
/// <summary> | |
/// LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C) | |
/// </summary> | |
/// <remarks> | |
///<para> An instruction builder represents a point within a basic block and is the exclusive means of building instructions using the C interface.</para> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateBuilderInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBuilderRef CreateBuilderInContext(LLVMContextRef c); | |
[DllImport(DLL, EntryPoint = "LLVMCreateBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBuilderRef CreateBuilder(); | |
[DllImport(DLL, EntryPoint = "LLVMPositionBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void PositionBuilder(LLVMBuilderRef builder, LLVMBasicBlockRef block, LLVMValueRef instr); | |
[DllImport(DLL, EntryPoint = "LLVMPositionBuilderBefore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void PositionBuilderBefore(LLVMBuilderRef builder, LLVMValueRef instr); | |
[DllImport(DLL, EntryPoint = "LLVMPositionBuilderAtEnd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void PositionBuilderAtEnd(LLVMBuilderRef builder, LLVMBasicBlockRef block); | |
[DllImport(DLL, EntryPoint = "LLVMGetInsertBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBasicBlockRef GetInsertBlock(LLVMBuilderRef builder); | |
[DllImport(DLL, EntryPoint = "LLVMClearInsertionPosition", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void ClearInsertionPosition(LLVMBuilderRef builder); | |
[DllImport(DLL, EntryPoint = "LLVMInsertIntoBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InsertIntoBuilder(LLVMBuilderRef builder, LLVMValueRef instr); | |
[DllImport(DLL, EntryPoint = "LLVMInsertIntoBuilderWithName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InsertIntoBuilderWithName(LLVMBuilderRef builder, LLVMValueRef instr, string name); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeBuilder(LLVMBuilderRef builder); | |
/// <summary> | |
/// void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) | |
/// </summary> | |
/// <remarks> | |
///<para> Metadata </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetCurrentDebugLocation", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetCurrentDebugLocation(LLVMBuilderRef builder, LLVMValueRef l); | |
[DllImport(DLL, EntryPoint = "LLVMGetCurrentDebugLocation", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetCurrentDebugLocation(LLVMBuilderRef builder); | |
[DllImport(DLL, EntryPoint = "LLVMSetInstDebugLocation", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetInstDebugLocation(LLVMBuilderRef builder, LLVMValueRef inst); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef) | |
/// </summary> | |
/// <remarks> | |
///<para> Terminators </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildRetVoid", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildRetVoid(LLVMBuilderRef param0); | |
[DllImport(DLL, EntryPoint = "LLVMBuildRet", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildRet(LLVMBuilderRef param0, LLVMValueRef v); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAggregateRet", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAggregateRet(LLVMBuilderRef param0, LLVMValueRef* retVals, uint n); | |
[DllImport(DLL, EntryPoint = "LLVMBuildBr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildBr(LLVMBuilderRef param0, LLVMBasicBlockRef dest); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCondBr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCondBr(LLVMBuilderRef param0, LLVMValueRef @if, LLVMBasicBlockRef then, LLVMBasicBlockRef @else); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSwitch", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSwitch(LLVMBuilderRef param0, LLVMValueRef v, LLVMBasicBlockRef @else, uint numCases); | |
[DllImport(DLL, EntryPoint = "LLVMBuildIndirectBr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildIndirectBr(LLVMBuilderRef b, LLVMValueRef addr, uint numDests); | |
[DllImport(DLL, EntryPoint = "LLVMBuildInvoke", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildInvoke(LLVMBuilderRef param0, LLVMValueRef fn, LLVMValueRef* args, uint numArgs, LLVMBasicBlockRef then, LLVMBasicBlockRef @catch, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildUnreachable", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildUnreachable(LLVMBuilderRef param0); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn) | |
/// </summary> | |
/// <remarks> | |
///<para> Exception Handling </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildResume", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildResume(LLVMBuilderRef b, LLVMValueRef exn); | |
[DllImport(DLL, EntryPoint = "LLVMBuildLandingPad", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildLandingPad(LLVMBuilderRef b, LLVMTypeRef ty, LLVMValueRef persFn, uint numClauses, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCleanupRet", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCleanupRet(LLVMBuilderRef b, LLVMValueRef catchPad, LLVMBasicBlockRef bB); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCatchRet", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCatchRet(LLVMBuilderRef b, LLVMValueRef catchPad, LLVMBasicBlockRef bB); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCatchPad", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCatchPad(LLVMBuilderRef b, LLVMValueRef parentPad, LLVMValueRef* args, uint numArgs, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCleanupPad", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCleanupPad(LLVMBuilderRef b, LLVMValueRef parentPad, LLVMValueRef* args, uint numArgs, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCatchSwitch", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCatchSwitch(LLVMBuilderRef b, LLVMValueRef parentPad, LLVMBasicBlockRef unwindBB, uint numHandlers, string name); | |
/// <summary> | |
/// void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, | |
/// LLVMBasicBlockRef Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a case to the switch instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddCase", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddCase(LLVMValueRef @switch, LLVMValueRef onVal, LLVMBasicBlockRef dest); | |
/// <summary> | |
/// void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a destination to the indirectbr instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddDestination", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddDestination(LLVMValueRef indirectBr, LLVMBasicBlockRef dest); | |
/// <summary> | |
/// unsigned int LLVMGetNumClauses(LLVMValueRef LandingPad) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the number of clauses on the landingpad instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumClauses", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumClauses(LLVMValueRef landingPad); | |
/// <summary> | |
/// LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned int Idx) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the value of the clause at idnex Idx on the landingpad instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetClause", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetClause(LLVMValueRef landingPad, uint idx); | |
/// <summary> | |
/// void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a catch or filter clause to the landingpad instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddClause", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddClause(LLVMValueRef landingPad, LLVMValueRef clauseVal); | |
/// <summary> | |
/// LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the 'cleanup' flag in the landingpad instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsCleanup", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsCleanup(LLVMValueRef landingPad); | |
/// <summary> | |
/// void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the 'cleanup' flag in the landingpad instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetCleanup", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetCleanup(LLVMValueRef landingPad, LLVMBool val); | |
/// <summary> | |
/// void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest) | |
/// </summary> | |
/// <remarks> | |
///<para> Add a destination to the catchswitch instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddHandler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddHandler(LLVMValueRef catchSwitch, LLVMBasicBlockRef dest); | |
/// <summary> | |
/// unsigned int LLVMGetNumHandlers(LLVMValueRef CatchSwitch) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the number of handlers on the catchswitch instruction </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetNumHandlers", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetNumHandlers(LLVMValueRef catchSwitch); | |
/// <summary> | |
/// void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the basic blocks acting as handlers for a catchswitch instruction.</para> | |
///<para> The catchswitch instruction to operate on. </para> | |
///<para> Memory address of an array to be filled with basic blocks.</para> | |
///<para> The Handlers parameter should point to a pre-allocated array of LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the first LLVMGetNumHandlers() entries in the array will be populated with LLVMBasicBlockRef instances.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetHandlers", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void GetHandlers(LLVMValueRef catchSwitch, LLVMBasicBlockRef* handlers); | |
/// <summary> | |
/// LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned int i) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the number of funcletpad arguments. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetArgOperand", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetArgOperand(LLVMValueRef funclet, uint i); | |
/// <summary> | |
/// void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned int i, LLVMValueRef value) | |
/// </summary> | |
/// <remarks> | |
///<para> Set a funcletpad argument at the given index. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetArgOperand", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetArgOperand(LLVMValueRef funclet, uint i, LLVMValueRef @value); | |
/// <summary> | |
/// LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the parent catchswitch instruction of a catchpad instruction.</para> | |
///<para> This only works on llvm::CatchPadInst instructions.</para> | |
///<para> llvm::CatchPadInst::getCatchSwitch()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetParentCatchSwitch", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef GetParentCatchSwitch(LLVMValueRef catchPad); | |
/// <summary> | |
/// void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the parent catchswitch instruction of a catchpad instruction.</para> | |
///<para> This only works on llvm::CatchPadInst instructions.</para> | |
///<para> llvm::CatchPadInst::setCatchSwitch()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetParentCatchSwitch", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetParentCatchSwitch(LLVMValueRef catchPad, LLVMValueRef catchSwitch); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, | |
/// const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Arithmetic </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAdd(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNSWAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNSWAdd(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNUWAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNUWAdd(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFAdd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFAdd(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSub(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNSWSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNSWSub(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNUWSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNUWSub(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFSub", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFSub(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildMul(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNSWMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNSWMul(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNUWMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNUWMul(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFMul", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFMul(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildUDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildUDiv(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildExactUDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildExactUDiv(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSDiv(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildExactSDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildExactSDiv(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFDiv", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFDiv(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildURem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildURem(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSRem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSRem(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFRem", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFRem(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildShl", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildShl(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildLShr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildLShr(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAShr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAShr(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAnd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAnd(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildOr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildOr(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildXor", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildXor(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildBinOp", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildBinOp(LLVMBuilderRef b, LLVMOpcode op, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNeg(LLVMBuilderRef param0, LLVMValueRef v, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNSWNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNSWNeg(LLVMBuilderRef b, LLVMValueRef v, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNUWNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNUWNeg(LLVMBuilderRef b, LLVMValueRef v, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFNeg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFNeg(LLVMBuilderRef param0, LLVMValueRef v, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildNot", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildNot(LLVMBuilderRef param0, LLVMValueRef v, string name); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Memory </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildMalloc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildMalloc(LLVMBuilderRef param0, LLVMTypeRef ty, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildArrayMalloc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildArrayMalloc(LLVMBuilderRef param0, LLVMTypeRef ty, LLVMValueRef val, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAlloca", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAlloca(LLVMBuilderRef param0, LLVMTypeRef ty, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildArrayAlloca", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildArrayAlloca(LLVMBuilderRef param0, LLVMTypeRef ty, LLVMValueRef val, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFree", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFree(LLVMBuilderRef param0, LLVMValueRef pointerVal); | |
[DllImport(DLL, EntryPoint = "LLVMBuildLoad", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildLoad(LLVMBuilderRef param0, LLVMValueRef pointerVal, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildStore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildStore(LLVMBuilderRef param0, LLVMValueRef val, LLVMValueRef ptr); | |
[DllImport(DLL, EntryPoint = "LLVMBuildGEP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildGEP(LLVMBuilderRef b, LLVMValueRef pointer, LLVMValueRef* indices, uint numIndices, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildInBoundsGEP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildInBoundsGEP(LLVMBuilderRef b, LLVMValueRef pointer, LLVMValueRef* indices, uint numIndices, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildStructGEP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildStructGEP(LLVMBuilderRef b, LLVMValueRef pointer, uint idx, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildGlobalString", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildGlobalString(LLVMBuilderRef b, string str, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildGlobalStringPtr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildGlobalStringPtr(LLVMBuilderRef b, string str, string name); | |
[DllImport(DLL, EntryPoint = "LLVMGetVolatile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool GetVolatile(LLVMValueRef memoryAccessInst); | |
[DllImport(DLL, EntryPoint = "LLVMSetVolatile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetVolatile(LLVMValueRef memoryAccessInst, LLVMBool isVolatile); | |
[DllImport(DLL, EntryPoint = "LLVMGetOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAtomicOrdering GetOrdering(LLVMValueRef memoryAccessInst); | |
[DllImport(DLL, EntryPoint = "LLVMSetOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetOrdering(LLVMValueRef memoryAccessInst, LLVMAtomicOrdering ordering); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, | |
/// LLVMTypeRef DestTy, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Casts </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildTrunc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildTrunc(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildZExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildZExt(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSExt(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFPToUI", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFPToUI(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFPToSI", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFPToSI(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildUIToFP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildUIToFP(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSIToFP", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSIToFP(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFPTrunc", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFPTrunc(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFPExt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFPExt(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildPtrToInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildPtrToInt(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildIntToPtr", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildIntToPtr(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildBitCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAddrSpaceCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAddrSpaceCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildZExtOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildZExtOrBitCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSExtOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSExtOrBitCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildTruncOrBitCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildTruncOrBitCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCast(LLVMBuilderRef b, LLVMOpcode op, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildPointerCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildPointerCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildIntCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildIntCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFPCast", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFPCast(LLVMBuilderRef param0, LLVMValueRef val, LLVMTypeRef destTy, string name); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, | |
/// LLVMValueRef LHS, LLVMValueRef RHS, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Comparisons </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildICmp", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildICmp(LLVMBuilderRef param0, LLVMIntPredicate op, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFCmp", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFCmp(LLVMBuilderRef param0, LLVMRealPredicate op, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
/// <summary> | |
/// LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name) | |
/// </summary> | |
/// <remarks> | |
///<para> Miscellaneous instructions </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMBuildPhi", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildPhi(LLVMBuilderRef param0, LLVMTypeRef ty, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildCall", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildCall(LLVMBuilderRef param0, LLVMValueRef fn, LLVMValueRef* args, uint numArgs, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildSelect", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildSelect(LLVMBuilderRef param0, LLVMValueRef @if, LLVMValueRef then, LLVMValueRef @else, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildVAArg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildVAArg(LLVMBuilderRef param0, LLVMValueRef list, LLVMTypeRef ty, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildExtractElement", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildExtractElement(LLVMBuilderRef param0, LLVMValueRef vecVal, LLVMValueRef index, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildInsertElement", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildInsertElement(LLVMBuilderRef param0, LLVMValueRef vecVal, LLVMValueRef eltVal, LLVMValueRef index, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildShuffleVector", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildShuffleVector(LLVMBuilderRef param0, LLVMValueRef v1, LLVMValueRef v2, LLVMValueRef mask, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildExtractValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildExtractValue(LLVMBuilderRef param0, LLVMValueRef aggVal, uint index, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildInsertValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildInsertValue(LLVMBuilderRef param0, LLVMValueRef aggVal, LLVMValueRef eltVal, uint index, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildIsNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildIsNull(LLVMBuilderRef param0, LLVMValueRef val, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildIsNotNull", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildIsNotNull(LLVMBuilderRef param0, LLVMValueRef val, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildPtrDiff", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildPtrDiff(LLVMBuilderRef param0, LLVMValueRef lHS, LLVMValueRef rHS, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildFence", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildFence(LLVMBuilderRef b, LLVMAtomicOrdering ordering, LLVMBool singleThread, string name); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAtomicRMW", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAtomicRMW(LLVMBuilderRef b, LLVMAtomicRMWBinOp op, LLVMValueRef pTR, LLVMValueRef val, LLVMAtomicOrdering ordering, LLVMBool singleThread); | |
[DllImport(DLL, EntryPoint = "LLVMBuildAtomicCmpXchg", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef BuildAtomicCmpXchg(LLVMBuilderRef b, LLVMValueRef ptr, LLVMValueRef cmp, LLVMValueRef @new, LLVMAtomicOrdering successOrdering, LLVMAtomicOrdering failureOrdering, LLVMBool singleThread); | |
[DllImport(DLL, EntryPoint = "LLVMIsAtomicSingleThread", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsAtomicSingleThread(LLVMValueRef atomicInst); | |
[DllImport(DLL, EntryPoint = "LLVMSetAtomicSingleThread", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetAtomicSingleThread(LLVMValueRef atomicInst, LLVMBool singleThread); | |
[DllImport(DLL, EntryPoint = "LLVMGetCmpXchgSuccessOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAtomicOrdering GetCmpXchgSuccessOrdering(LLVMValueRef cmpXchgInst); | |
[DllImport(DLL, EntryPoint = "LLVMSetCmpXchgSuccessOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetCmpXchgSuccessOrdering(LLVMValueRef cmpXchgInst, LLVMAtomicOrdering ordering); | |
[DllImport(DLL, EntryPoint = "LLVMGetCmpXchgFailureOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMAtomicOrdering GetCmpXchgFailureOrdering(LLVMValueRef cmpXchgInst); | |
[DllImport(DLL, EntryPoint = "LLVMSetCmpXchgFailureOrdering", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetCmpXchgFailureOrdering(LLVMValueRef cmpXchgInst, LLVMAtomicOrdering ordering); | |
/// <summary> | |
/// LLVMModuleProviderRef LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Changes the type of M so it can be passed to FunctionPassManagers and the JIT. They take ModuleProviders for historical reasons.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateModuleProviderForExistingModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMModuleProviderRef CreateModuleProviderForExistingModule(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMDisposeModuleProvider(LLVMModuleProviderRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Destroys the module M.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeModuleProvider", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeModuleProvider(LLVMModuleProviderRef m); | |
/// <summary> | |
/// LLVMBool LLVMCreateMemoryBufferWithContentsOfFile( | |
/// const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage) | |
/// </summary> | |
/// <remarks> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateMemoryBufferWithContentsOfFile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateMemoryBufferWithContentsOfFile(string path, LLVMMemoryBufferRef* outMemBuf, out byte* outMessage); | |
[DllImport(DLL, EntryPoint = "LLVMCreateMemoryBufferWithSTDIN", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef* outMemBuf, out byte* outMessage); | |
[DllImport(DLL, EntryPoint = "LLVMCreateMemoryBufferWithMemoryRange", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMemoryBufferRef CreateMemoryBufferWithMemoryRange(string inputData, UIntPtr inputDataLength, string bufferName, LLVMBool requiresNullTerminator); | |
[DllImport(DLL, EntryPoint = "LLVMCreateMemoryBufferWithMemoryRangeCopy", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMemoryBufferRef CreateMemoryBufferWithMemoryRangeCopy(string inputData, UIntPtr inputDataLength, string bufferName); | |
[DllImport(DLL, EntryPoint = "LLVMGetBufferStart", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string GetBufferStart(LLVMMemoryBufferRef memBuf); | |
[DllImport(DLL, EntryPoint = "LLVMGetBufferSize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern UIntPtr GetBufferSize(LLVMMemoryBufferRef memBuf); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeMemoryBuffer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeMemoryBuffer(LLVMMemoryBufferRef memBuf); | |
/// <summary> | |
/// LLVMPassRegistryRef LLVMGetGlobalPassRegistry() | |
/// </summary> | |
/// <remarks> | |
///<para> Return the global pass registry, for use with initialization functions. </para> | |
///<para> llvm::PassRegistry::getPassRegistry </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetGlobalPassRegistry", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMPassRegistryRef GetGlobalPassRegistry(); | |
/// <summary> | |
/// LLVMPassManagerRef LLVMCreatePassManager() | |
/// </summary> | |
/// <remarks> | |
///<para> Constructs a new whole-module pass pipeline. This type of pipeline is suitable for link-time optimization and whole-module transformations. </para> | |
///<para> llvm::PassManager::PassManager </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreatePassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMPassManagerRef CreatePassManager(); | |
/// <summary> | |
/// LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Constructs a new function-by-function pass pipeline over the module provider. It does not take ownership of the module provider. This type of pipeline is suitable for code generation and JIT compilation tasks. </para> | |
///<para> llvm::FunctionPassManager::FunctionPassManager </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateFunctionPassManagerForModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMPassManagerRef CreateFunctionPassManagerForModule(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP) | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateFunctionPassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMPassManagerRef CreateFunctionPassManager(LLVMModuleProviderRef mP); | |
/// <summary> | |
/// LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. </para> | |
///<para> llvm::PassManager::run(Module&) </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMRunPassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool RunPassManager(LLVMPassManagerRef pM, LLVMModuleRef m); | |
/// <summary> | |
/// LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM) | |
/// </summary> | |
/// <remarks> | |
///<para> Initializes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. </para> | |
///<para> llvm::FunctionPassManager::doInitialization </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeFunctionPassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool InitializeFunctionPassManager(LLVMPassManagerRef fPM); | |
/// <summary> | |
/// LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F) | |
/// </summary> | |
/// <remarks> | |
///<para> Executes all of the function passes scheduled in the function pass manager on the provided function. Returns 1 if any of the passes modified the function, false otherwise. </para> | |
///<para> llvm::FunctionPassManager::run(Function&) </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMRunFunctionPassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool RunFunctionPassManager(LLVMPassManagerRef fPM, LLVMValueRef f); | |
/// <summary> | |
/// LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM) | |
/// </summary> | |
/// <remarks> | |
///<para> Finalizes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. </para> | |
///<para> llvm::FunctionPassManager::doFinalization </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMFinalizeFunctionPassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool FinalizeFunctionPassManager(LLVMPassManagerRef fPM); | |
/// <summary> | |
/// void LLVMDisposePassManager(LLVMPassManagerRef PM) | |
/// </summary> | |
/// <remarks> | |
///<para> Frees the memory of a pass pipeline. For function pipelines, does not free the module provider. </para> | |
///<para> llvm::PassManagerBase::~PassManagerBase. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposePassManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposePassManager(LLVMPassManagerRef pM); | |
/// <summary> | |
/// LLVMBool LLVMStartMultithreaded() | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS. This function always returns LLVMIsMultithreaded(). </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStartMultithreaded", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool StartMultithreaded(); | |
/// <summary> | |
/// void LLVMStopMultithreaded() | |
/// </summary> | |
/// <remarks> | |
///<para> Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStopMultithreaded", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void StopMultithreaded(); | |
/// <summary> | |
/// LLVMBool LLVMIsMultithreaded() | |
/// </summary> | |
/// <remarks> | |
///<para> Check whether LLVM is executing in thread-safe mode or not. </para> | |
///<para> llvm::llvm_is_multithreaded </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIsMultithreaded", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool IsMultithreaded(); | |
/// <summary> | |
/// unsigned int LLVMDebugMetadataVersion() | |
/// </summary> | |
/// <remarks> | |
///<para> The current debug metadata version number.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDebugMetadataVersion", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint DebugMetadataVersion(); | |
/// <summary> | |
/// unsigned int LLVMGetModuleDebugMetadataVersion(LLVMModuleRef Module) | |
/// </summary> | |
/// <remarks> | |
///<para> The version of debug metadata that's present in the provided Module.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleDebugMetadataVersion", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GetModuleDebugMetadataVersion(LLVMModuleRef module); | |
/// <summary> | |
/// LLVMBool LLVMStripModuleDebugInfo(LLVMModuleRef Module) | |
/// </summary> | |
/// <remarks> | |
///<para> 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.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStripModuleDebugInfo", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool StripModuleDebugInfo(LLVMModuleRef module); | |
/// <summary> | |
/// LLVMDIBuilderRef LLVMCreateDIBuilderDisallowUnresolved(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Construct a builder for a module, and do not allow for unresolved nodes attached to the module.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateDIBuilderDisallowUnresolved", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDIBuilderRef CreateDIBuilderDisallowUnresolved(LLVMModuleRef m); | |
/// <summary> | |
/// LLVMDIBuilderRef LLVMCreateDIBuilder(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Construct a builder for a module and collect unresolved nodes attached to the module in order to resolve cycles during a call to LLVMDIBuilderFinalize.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateDIBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDIBuilderRef CreateDIBuilder(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMDisposeDIBuilder(LLVMDIBuilderRef Builder) | |
/// </summary> | |
/// <remarks> | |
///<para> Deallocates the DIBuilder and everything it owns. </para> | |
///<para> You must call LLVMDIBuilderFinalize before this</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeDIBuilder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeDIBuilder(LLVMDIBuilderRef builder); | |
/// <summary> | |
/// void LLVMDIBuilderFinalize(LLVMDIBuilderRef Builder) | |
/// </summary> | |
/// <remarks> | |
///<para> Construct any deferred debug info descriptors.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderFinalize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DIBuilderFinalize(LLVMDIBuilderRef builder); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateCompileUnit( | |
/// LLVMDIBuilderRef Builder, LLVMDWARFSourceLanguage Lang, | |
/// LLVMMetadataRef FileRef, const char *Producer, size_t ProducerLen, | |
/// LLVMBool isOptimized, const char *Flags, size_t FlagsLen, | |
/// unsigned int RuntimeVer, const char *SplitName, size_t SplitNameLen, | |
/// LLVMDWARFEmissionKind Kind, unsigned int DWOId, LLVMBool SplitDebugInlining, | |
/// LLVMBool DebugInfoForProfiling) | |
/// </summary> | |
/// <remarks> | |
///<para> A CompileUnit provides an anchor for all debugging information generated during this instance of compilation. </para> | |
///<para> Source programming language, eg. LLVMDWARFSourceLanguageC99</para> | |
///<para> File info. </para> | |
///<para> Identify the producer of debugging information and code. Usually this is a compiler version string. </para> | |
///<para> The length of the C string passed to Producer.</para> | |
///<para> A boolean flag which indicates whether optimization is enabled or not. </para> | |
///<para> 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. </para> | |
///<para> The length of the C string passed to Flags.</para> | |
///<para> This indicates runtime version for languages like Objective-C. </para> | |
///<para> The name of the file that we'll split debug info out into. </para> | |
///<para> The length of the C string passed to SplitName.</para> | |
///<para> The kind of debug information to generate. </para> | |
///<para> The DWOId if this is a split skeleton compile unit. </para> | |
///<para> Whether to emit inline debug info. </para> | |
///<para> Whether to emit extra debug info for profile collection.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateCompileUnit", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateCompileUnit(LLVMDIBuilderRef builder, LLVMDWARFSourceLanguage lang, LLVMMetadataRef fileRef, string producer, UIntPtr producerLen, LLVMBool isOptimized, string flags, UIntPtr flagsLen, uint runtimeVer, string splitName, UIntPtr splitNameLen, LLVMDWARFEmissionKind kind, uint dWOId, LLVMBool splitDebugInlining, LLVMBool debugInfoForProfiling); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, | |
/// const char *Filename, | |
/// size_t FilenameLen, | |
/// const char *Directory, | |
/// size_t DirectoryLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a file descriptor to hold debugging information for a file. </para> | |
///<para> The DIBuilder.</para> | |
///<para> File name. </para> | |
///<para> The length of the C string passed to Filename.</para> | |
///<para> Directory. </para> | |
///<para> The length of the C string passed to Directory.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateFile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateFile(LLVMDIBuilderRef builder, string filename, UIntPtr filenameLen, string directory, UIntPtr directoryLen); | |
/// <summary> | |
/// 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) | |
/// </summary> | |
/// <remarks> | |
///<para> Creates a new descriptor for a module with the specified parent scope. </para> | |
///<para> The DIBuilder.</para> | |
///<para> The parent scope containing this module declaration. </para> | |
///<para> Module name. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> A space-separated shell-quoted list of -D macro definitions as they would appear on a command line. </para> | |
///<para> The length of the C string passed to ConfigMacros.</para> | |
///<para> The path to the module map file. </para> | |
///<para> The length of the C string passed to IncludePath.</para> | |
///<para> The Clang system root (value of -isysroot). </para> | |
///<para> The length of the C string passed to ISysRoot.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateModule(LLVMDIBuilderRef builder, LLVMMetadataRef parentScope, string name, UIntPtr nameLen, string configMacros, UIntPtr configMacrosLen, string includePath, UIntPtr includePathLen, string iSysRoot, UIntPtr iSysRootLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateNameSpace(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef ParentScope, | |
/// const char *Name, size_t NameLen, | |
/// LLVMBool ExportSymbols) | |
/// </summary> | |
/// <remarks> | |
///<para> Creates a new descriptor for a namespace with the specified parent scope. </para> | |
///<para> The DIBuilder.</para> | |
///<para> The parent scope containing this module declaration. </para> | |
///<para> NameSpace name. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> Whether or not the namespace exports symbols, e.g. this is true of C++ inline namespaces.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateNameSpace", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateNameSpace(LLVMDIBuilderRef builder, LLVMMetadataRef parentScope, string name, UIntPtr nameLen, LLVMBool exportSymbols); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateFunction( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, const char *LinkageName, size_t LinkageNameLen, | |
/// LLVMMetadataRef File, unsigned int LineNo, LLVMMetadataRef Ty, | |
/// LLVMBool IsLocalToUnit, LLVMBool IsDefinition, unsigned int ScopeLine, | |
/// LLVMDIFlags Flags, LLVMBool IsOptimized) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for the specified subprogram. </para> | |
///<para> The DIBuilder.</para> | |
///<para> Function scope. </para> | |
///<para> Function name. </para> | |
///<para> Length of enumeration name. </para> | |
///<para> Mangled function name. </para> | |
///<para> Length of linkage name. </para> | |
///<para> File where this variable is defined. </para> | |
///<para> Line number. </para> | |
///<para> Function type. </para> | |
///<para> True if this function is not externally visible. </para> | |
///<para> True if this is a function definition. </para> | |
///<para> Set to the beginning of the scope this starts </para> | |
///<para> E.g.: LLVMDIFlagLValueReference. These flags are used to emit dwarf attributes. </para> | |
///<para> True if optimization is ON.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateFunction(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, string linkageName, UIntPtr linkageNameLen, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef ty, LLVMBool isLocalToUnit, LLVMBool isDefinition, uint scopeLine, LLVMDIFlags flags, LLVMBool isOptimized); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef Scope, | |
/// LLVMMetadataRef File, | |
/// unsigned int Line, | |
/// unsigned int Column) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for a lexical block with the specified parent context. </para> | |
///<para> The DIBuilder.</para> | |
///<para> Parent lexical block. </para> | |
///<para> Source file. </para> | |
///<para> The line in the source file. </para> | |
///<para> The column in the source file.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateLexicalBlock", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateLexicalBlock(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef file, uint line, uint column); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef Scope, | |
/// LLVMMetadataRef File, | |
/// unsigned int Discriminator) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for a lexical block with a new file attached. </para> | |
///<para> The DIBuilder.</para> | |
///<para> Lexical block. </para> | |
///<para> Source file. </para> | |
///<para> DWARF path discriminator value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateLexicalBlockFile", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef file, uint discriminator); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromNamespace( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef NS, | |
/// LLVMMetadataRef File, unsigned int Line) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for an imported namespace. Suitable for e.g. C++ using declarations. </para> | |
///<para> The DIBuilder.</para> | |
///<para> The scope this module is imported into </para> | |
///<para> File where the declaration is located. </para> | |
///<para> Line number of the declaration.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateImportedModuleFromNamespace", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateImportedModuleFromNamespace(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef nS, LLVMMetadataRef file, uint line); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromAlias( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, | |
/// LLVMMetadataRef ImportedEntity, LLVMMetadataRef File, unsigned int Line) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for an imported module that aliases another imported entity descriptor. </para> | |
///<para> The DIBuilder.</para> | |
///<para> The scope this module is imported into </para> | |
///<para> Previous imported entity to alias. </para> | |
///<para> File where the declaration is located. </para> | |
///<para> Line number of the declaration.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateImportedModuleFromAlias", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateImportedModuleFromAlias(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef importedEntity, LLVMMetadataRef file, uint line); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateImportedModuleFromModule( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef M, | |
/// LLVMMetadataRef File, unsigned int Line) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for an imported module. </para> | |
///<para> The DIBuilder.</para> | |
///<para> The scope this module is imported into </para> | |
///<para> The module being imported here </para> | |
///<para> File where the declaration is located. </para> | |
///<para> Line number of the declaration.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateImportedModuleFromModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateImportedModuleFromModule(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef m, LLVMMetadataRef file, uint line); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateImportedDeclaration( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef Decl, | |
/// LLVMMetadataRef File, unsigned int Line, const char *Name, size_t NameLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for an imported function, type, or variable. Suitable for e.g. FORTRAN-style USE declarations. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The scope this module is imported into. </para> | |
///<para> The declaration (or definition) of a function, type, or variable. </para> | |
///<para> File where the declaration is located. </para> | |
///<para> Line number of the declaration. </para> | |
///<para> A name that uniquely identifies this imported declaration. </para> | |
///<para> The length of the C string passed to Name.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateImportedDeclaration", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateImportedDeclaration(LLVMDIBuilderRef builder, LLVMMetadataRef scope, LLVMMetadataRef decl, LLVMMetadataRef file, uint line, string name, UIntPtr nameLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateDebugLocation(LLVMContextRef Ctx, | |
/// unsigned int Line, | |
/// unsigned int Column, | |
/// LLVMMetadataRef Scope, | |
/// LLVMMetadataRef InlinedAt) | |
/// </summary> | |
/// <remarks> | |
///<para> Creates a new DebugLocation that describes a source location. </para> | |
///<para> The line in the source file. </para> | |
///<para> The column in the source file. </para> | |
///<para> The scope in which the location resides. </para> | |
///<para> The scope where this location was inlined, if at all. (optional). </para> | |
///<para> If the item to which this location is attached cannot be attributed to a source line, pass 0 for the line and column.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateDebugLocation", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateDebugLocation(LLVMContextRef ctx, uint line, uint column, LLVMMetadataRef scope, LLVMMetadataRef inlinedAt); | |
/// <summary> | |
/// unsigned int LLVMDILocationGetLine(LLVMMetadataRef Location) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the line number of this debug location. </para> | |
///<para> The debug location.</para> | |
///<para> DILocation::getLine()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDILocationGetLine", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint DILocationGetLine(LLVMMetadataRef location); | |
/// <summary> | |
/// unsigned int LLVMDILocationGetColumn(LLVMMetadataRef Location) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the column number of this debug location. </para> | |
///<para> The debug location.</para> | |
///<para> DILocation::getColumn()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDILocationGetColumn", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint DILocationGetColumn(LLVMMetadataRef location); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDILocationGetScope(LLVMMetadataRef Location) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the local scope associated with this debug location. </para> | |
///<para> The debug location.</para> | |
///<para> DILocation::getScope()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDILocationGetScope", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DILocationGetScope(LLVMMetadataRef location); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef *Data, | |
/// size_t NumElements) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a type array. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The type elements. </para> | |
///<para> Number of type elements.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderGetOrCreateTypeArray", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef builder, LLVMMetadataRef* data, UIntPtr numElements); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateSubroutineType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef File, | |
/// LLVMMetadataRef *ParameterTypes, unsigned int NumParameterTypes, | |
/// LLVMDIFlags Flags) | |
/// </summary> | |
/// <remarks> | |
///<para> Create subroutine type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The file in which the subroutine resides. </para> | |
///<para> An array of subroutine parameter types. This includes return type at 0th index. </para> | |
///<para> The number of parameter types in ParameterTypes</para> | |
///<para> E.g.: LLVMDIFlagLValueReference. These flags are used to emit dwarf attributes.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateSubroutineType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateSubroutineType(LLVMDIBuilderRef builder, LLVMMetadataRef file, LLVMMetadataRef* parameterTypes, uint numParameterTypes, LLVMDIFlags flags); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateEnumerationType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// uint64_t SizeInBits, uint32_t AlignInBits, LLVMMetadataRef *Elements, | |
/// unsigned int NumElements, LLVMMetadataRef ClassTy) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for an enumeration. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Scope in which this enumeration is defined. </para> | |
///<para> Enumeration name. </para> | |
///<para> Length of enumeration name. </para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Enumeration elements. </para> | |
///<para> Number of enumeration elements. </para> | |
///<para> Underlying type of a C++11/ObjC fixed enum.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateEnumerationType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateEnumerationType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, ulong sizeInBits, uint alignInBits, LLVMMetadataRef* elements, uint numElements, LLVMMetadataRef classTy); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateUnionType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, | |
/// LLVMMetadataRef *Elements, unsigned int NumElements, | |
/// unsigned int RunTimeLang, const char *UniqueId, size_t UniqueIdLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a union. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Scope in which this union is defined. </para> | |
///<para> Union name. </para> | |
///<para> Length of union name. </para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Flags to encode member attribute, e.g. private </para> | |
///<para> Union elements. </para> | |
///<para> Number of union elements. </para> | |
///<para> Optional parameter, Objective-C runtime version. </para> | |
///<para> A unique identifier for the union. </para> | |
///<para> Length of unique identifier.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateUnionType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateUnionType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, ulong sizeInBits, uint alignInBits, LLVMDIFlags flags, LLVMMetadataRef* elements, uint numElements, uint runTimeLang, string uniqueId, UIntPtr uniqueIdLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateArrayType( | |
/// LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, | |
/// LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned int NumSubscripts) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for an array. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Array size. </para> | |
///<para> Alignment. </para> | |
///<para> Element type. </para> | |
///<para> Subscripts. </para> | |
///<para> Number of subscripts.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateArrayType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateArrayType(LLVMDIBuilderRef builder, ulong size, uint alignInBits, LLVMMetadataRef ty, LLVMMetadataRef* subscripts, uint numSubscripts); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateVectorType( | |
/// LLVMDIBuilderRef Builder, uint64_t Size, uint32_t AlignInBits, | |
/// LLVMMetadataRef Ty, LLVMMetadataRef *Subscripts, unsigned int NumSubscripts) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a vector type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Vector size. </para> | |
///<para> Alignment. </para> | |
///<para> Element type. </para> | |
///<para> Subscripts. </para> | |
///<para> Number of subscripts.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateVectorType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateVectorType(LLVMDIBuilderRef builder, ulong size, uint alignInBits, LLVMMetadataRef ty, LLVMMetadataRef* subscripts, uint numSubscripts); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateUnspecifiedType(LLVMDIBuilderRef Builder, | |
/// const char *Name, | |
/// size_t NameLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a DWARF unspecified type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The unspecified type's name. </para> | |
///<para> Length of type name.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateUnspecifiedType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateUnspecifiedType(LLVMDIBuilderRef builder, string name, UIntPtr nameLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Builder, | |
/// const char *Name, size_t NameLen, | |
/// uint64_t SizeInBits, | |
/// LLVMDWARFTypeEncoding Encoding) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a basic type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Type name. </para> | |
///<para> Length of type name. </para> | |
///<para> Size of the type. </para> | |
///<para> DWARF encoding code, e.g. LLVMDWARFTypeEncoding_float.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateBasicType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateBasicType(LLVMDIBuilderRef builder, string name, UIntPtr nameLen, ulong sizeInBits, LLVMDWARFTypeEncoding encoding); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef PointeeTy, | |
/// uint64_t SizeInBits, | |
/// uint32_t AlignInBits, | |
/// unsigned int AddressSpace, | |
/// const char *Name, size_t NameLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a pointer. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Type pointed by this pointer. </para> | |
///<para> Size. </para> | |
///<para> Alignment. (optional, pass 0 to ignore) </para> | |
///<para> DWARF address space. (optional, pass 0 to ignore) </para> | |
///<para> Pointer type name. (optional) </para> | |
///<para> Length of pointer type name. (optional)</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreatePointerType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreatePointerType(LLVMDIBuilderRef builder, LLVMMetadataRef pointeeTy, ulong sizeInBits, uint alignInBits, uint addressSpace, string name, UIntPtr nameLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateStructType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// uint64_t SizeInBits, uint32_t AlignInBits, LLVMDIFlags Flags, | |
/// LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, | |
/// unsigned int NumElements, unsigned int RunTimeLang, | |
/// LLVMMetadataRef VTableHolder, const char *UniqueId, size_t UniqueIdLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a struct. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Scope in which this struct is defined. </para> | |
///<para> Struct name. </para> | |
///<para> Struct name length. </para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Flags to encode member attribute, e.g. private </para> | |
///<para> Struct elements. </para> | |
///<para> Number of struct elements. </para> | |
///<para> Optional parameter, Objective-C runtime version. </para> | |
///<para> The object containing the vtable for the struct. </para> | |
///<para> A unique identifier for the struct. </para> | |
///<para> Length of the unique identifier for the struct.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateStructType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateStructType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, ulong sizeInBits, uint alignInBits, LLVMDIFlags flags, LLVMMetadataRef derivedFrom, LLVMMetadataRef* elements, uint numElements, uint runTimeLang, LLVMMetadataRef vTableHolder, string uniqueId, UIntPtr uniqueIdLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateMemberType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNo, | |
/// uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, | |
/// LLVMDIFlags Flags, LLVMMetadataRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a member. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Member scope. </para> | |
///<para> Member name. </para> | |
///<para> Length of member name. </para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Member offset. </para> | |
///<para> Flags to encode member attribute, e.g. private </para> | |
///<para> Parent type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateMemberType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateMemberType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNo, ulong sizeInBits, uint alignInBits, ulong offsetInBits, LLVMDIFlags flags, LLVMMetadataRef ty); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateStaticMemberType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal, | |
/// uint32_t AlignInBits) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a C++ static data member. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Member scope. </para> | |
///<para> Member name. </para> | |
///<para> Length of member name. </para> | |
///<para> File where this member is declared. </para> | |
///<para> Line number. </para> | |
///<para> Type of the static member. </para> | |
///<para> Flags to encode member attribute, e.g. private. </para> | |
///<para> Const initializer of the member. </para> | |
///<para> Member alignment.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateStaticMemberType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateStaticMemberType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, LLVMMetadataRef type, LLVMDIFlags flags, LLVMValueRef constantVal, uint alignInBits); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateMemberPointerType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef PointeeType, | |
/// LLVMMetadataRef ClassType, uint64_t SizeInBits, uint32_t AlignInBits, | |
/// LLVMDIFlags Flags) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a pointer to member. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Type pointed to by this pointer. </para> | |
///<para> Type for which this pointer points to members of. </para> | |
///<para> Size. </para> | |
///<para> Alignment. </para> | |
///<para> Flags.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateMemberPointerType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateMemberPointerType(LLVMDIBuilderRef builder, LLVMMetadataRef pointeeType, LLVMMetadataRef classType, ulong sizeInBits, uint alignInBits, LLVMDIFlags flags); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateObjCIVar( | |
/// LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, | |
/// LLVMMetadataRef File, unsigned int LineNo, uint64_t SizeInBits, | |
/// uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags, | |
/// LLVMMetadataRef Ty, LLVMMetadataRef PropertyNode) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for Objective-C instance variable. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Member name. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Member offset. </para> | |
///<para> Flags to encode member attribute, e.g. private </para> | |
///<para> Parent type. </para> | |
///<para> Property associated with this ivar.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateObjCIVar", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateObjCIVar(LLVMDIBuilderRef builder, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNo, ulong sizeInBits, uint alignInBits, ulong offsetInBits, LLVMDIFlags flags, LLVMMetadataRef ty, LLVMMetadataRef propertyNode); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateObjCProperty( | |
/// LLVMDIBuilderRef Builder, const char *Name, size_t NameLen, | |
/// LLVMMetadataRef File, unsigned int LineNo, const char *GetterName, | |
/// size_t GetterNameLen, const char *SetterName, size_t SetterNameLen, | |
/// unsigned int PropertyAttributes, LLVMMetadataRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for Objective-C property. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Property name. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> File where this property is defined. </para> | |
///<para> Line number. </para> | |
///<para> Name of the Objective C property getter selector. </para> | |
///<para> The length of the C string passed to GetterName.</para> | |
///<para> Name of the Objective C property setter selector. </para> | |
///<para> The length of the C string passed to SetterName.</para> | |
///<para> Objective C property attributes. </para> | |
///<para> Type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateObjCProperty", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateObjCProperty(LLVMDIBuilderRef builder, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNo, string getterName, UIntPtr getterNameLen, string setterName, UIntPtr setterNameLen, uint propertyAttributes, LLVMMetadataRef ty); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateObjectPointerType(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef Type) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a uniqued DIType* clone with FlagObjectPointer and FlagArtificial set. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The underlying type to which this pointer points.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateObjectPointerType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateObjectPointerType(LLVMDIBuilderRef builder, LLVMMetadataRef type); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateQualifiedType(LLVMDIBuilderRef Builder, | |
/// unsigned int Tag, | |
/// LLVMMetadataRef Type) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a qualified type, e.g. 'const int'. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Tag identifying type, e.g. LLVMDWARFTypeQualifier_volatile_type </para> | |
///<para> Base Type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateQualifiedType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateQualifiedType(LLVMDIBuilderRef builder, uint tag, LLVMMetadataRef type); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateReferenceType(LLVMDIBuilderRef Builder, | |
/// unsigned int Tag, | |
/// LLVMMetadataRef Type) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a c++ style reference or rvalue reference type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Tag identifying type, </para> | |
///<para> Base Type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateReferenceType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateReferenceType(LLVMDIBuilderRef builder, uint tag, LLVMMetadataRef type); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateNullPtrType(LLVMDIBuilderRef Builder) | |
/// </summary> | |
/// <remarks> | |
///<para> Create C++11 nullptr type. </para> | |
///<para> The DIBuilder.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateNullPtrType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateNullPtrType(LLVMDIBuilderRef builder); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef Type, | |
/// const char *Name, size_t NameLen, | |
/// LLVMMetadataRef File, | |
/// unsigned int LineNo, | |
/// LLVMMetadataRef Scope) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a typedef. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Original type. </para> | |
///<para> Typedef name. </para> | |
///<para> File where this type is defined. </para> | |
///<para> Line number. </para> | |
///<para> The surrounding context for the typedef.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateTypedef", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateTypedef(LLVMDIBuilderRef builder, LLVMMetadataRef type, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef scope); | |
/// <summary> | |
/// LLVMMetadataRef | |
/// LLVMDIBuilderCreateInheritance(LLVMDIBuilderRef Builder, LLVMMetadataRef Ty, | |
/// LLVMMetadataRef BaseTy, uint64_t BaseOffset, | |
/// uint32_t VBPtrOffset, LLVMDIFlags Flags) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry to establish inheritance relationship between two types. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Original type. </para> | |
///<para> Base type. Ty is inherits from base. </para> | |
///<para> Base offset. </para> | |
///<para> Virtual base pointer offset. </para> | |
///<para> Flags to describe inheritance attribute, e.g. private</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateInheritance", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateInheritance(LLVMDIBuilderRef builder, LLVMMetadataRef ty, LLVMMetadataRef baseTy, ulong baseOffset, uint vBPtrOffset, LLVMDIFlags flags); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateForwardDecl( | |
/// LLVMDIBuilderRef Builder, unsigned int Tag, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, | |
/// unsigned int Line, unsigned int RuntimeLang, uint64_t SizeInBits, | |
/// uint32_t AlignInBits, const char *UniqueIdentifier, | |
/// size_t UniqueIdentifierLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a permanent forward-declared type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> A unique tag for this type. </para> | |
///<para> Type name. </para> | |
///<para> Length of type name. </para> | |
///<para> Type scope. </para> | |
///<para> File where this type is defined. </para> | |
///<para> Line number where this type is defined. </para> | |
///<para> Indicates runtime version for languages like Objective-C. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> A unique identifier for the type. </para> | |
///<para> Length of the unique identifier.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateForwardDecl", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateForwardDecl(LLVMDIBuilderRef builder, uint tag, string name, UIntPtr nameLen, LLVMMetadataRef scope, LLVMMetadataRef file, uint line, uint runtimeLang, ulong sizeInBits, uint alignInBits, string uniqueIdentifier, UIntPtr uniqueIdentifierLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType( | |
/// LLVMDIBuilderRef Builder, unsigned int Tag, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef Scope, LLVMMetadataRef File, | |
/// unsigned int Line, unsigned int RuntimeLang, uint64_t SizeInBits, | |
/// uint32_t AlignInBits, LLVMDIFlags Flags, const char *UniqueIdentifier, | |
/// size_t UniqueIdentifierLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a temporary forward-declared type. </para> | |
///<para> The DIBuilder. </para> | |
///<para> A unique tag for this type. </para> | |
///<para> Type name. </para> | |
///<para> Length of type name. </para> | |
///<para> Type scope. </para> | |
///<para> File where this type is defined. </para> | |
///<para> Line number where this type is defined. </para> | |
///<para> Indicates runtime version for languages like Objective-C. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Flags. </para> | |
///<para> A unique identifier for the type. </para> | |
///<para> Length of the unique identifier.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateReplaceableCompositeType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateReplaceableCompositeType(LLVMDIBuilderRef builder, uint tag, string name, UIntPtr nameLen, LLVMMetadataRef scope, LLVMMetadataRef file, uint line, uint runtimeLang, ulong sizeInBits, uint alignInBits, LLVMDIFlags flags, string uniqueIdentifier, UIntPtr uniqueIdentifierLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateBitFieldMemberType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, | |
/// LLVMDIFlags Flags, LLVMMetadataRef Type) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a bit field member. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Member scope. </para> | |
///<para> Member name. </para> | |
///<para> Length of member name. </para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member offset. </para> | |
///<para> Member storage offset. </para> | |
///<para> Flags to encode member attribute. </para> | |
///<para> Parent type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateBitFieldMemberType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateBitFieldMemberType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, ulong sizeInBits, ulong offsetInBits, ulong storageOffsetInBits, LLVMDIFlags flags, LLVMMetadataRef type); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateClassType( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, LLVMMetadataRef File, unsigned int LineNumber, | |
/// uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, | |
/// LLVMDIFlags Flags, LLVMMetadataRef DerivedFrom, LLVMMetadataRef *Elements, | |
/// unsigned int NumElements, LLVMMetadataRef VTableHolder, | |
/// LLVMMetadataRef TemplateParamsNode, const char *UniqueIdentifier, | |
/// size_t UniqueIdentifierLen) | |
/// </summary> | |
/// <remarks> | |
///<para> Create debugging information entry for a class. </para> | |
///<para> Scope in which this class is defined. </para> | |
///<para> Class name. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> File where this member is defined. </para> | |
///<para> Line number. </para> | |
///<para> Member size. </para> | |
///<para> Member alignment. </para> | |
///<para> Member offset. </para> | |
///<para> Flags to encode member attribute, e.g. private. </para> | |
///<para> Debug info of the base class of this type. </para> | |
///<para> Class members. </para> | |
///<para> Number of class elements. </para> | |
///<para> Debug info of the base class that contains vtable for this type. This is used in DW_AT_containing_type. See DWARF documentation for more info. </para> | |
///<para> Template type parameters. </para> | |
///<para> A unique identifier for the type. </para> | |
///<para> Length of the unique identifier.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateClassType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateClassType(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNumber, ulong sizeInBits, uint alignInBits, ulong offsetInBits, LLVMDIFlags flags, LLVMMetadataRef derivedFrom, LLVMMetadataRef* elements, uint numElements, LLVMMetadataRef vTableHolder, LLVMMetadataRef templateParamsNode, string uniqueIdentifier, UIntPtr uniqueIdentifierLen); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateArtificialType(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef Type) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a uniqued DIType* clone with FlagArtificial set. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The underlying type.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateArtificialType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateArtificialType(LLVMDIBuilderRef builder, LLVMMetadataRef type); | |
/// <summary> | |
/// const char *LLVMDITypeGetName(LLVMMetadataRef DType, size_t *Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the name of this DIType. </para> | |
///<para> The DIType. </para> | |
///<para> The length of the returned string.</para> | |
///<para> DIType::getName()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetName", CallingConvention=CallingConvention.Cdecl)] | |
public static extern string DITypeGetName(LLVMMetadataRef dType, out UIntPtr length); | |
/// <summary> | |
/// uint64_t LLVMDITypeGetSizeInBits(LLVMMetadataRef DType) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the size of this DIType in bits. </para> | |
///<para> The DIType.</para> | |
///<para> DIType::getSizeInBits()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetSizeInBits", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong DITypeGetSizeInBits(LLVMMetadataRef dType); | |
/// <summary> | |
/// uint64_t LLVMDITypeGetOffsetInBits(LLVMMetadataRef DType) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the offset of this DIType in bits. </para> | |
///<para> The DIType.</para> | |
///<para> DIType::getOffsetInBits()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetOffsetInBits", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong DITypeGetOffsetInBits(LLVMMetadataRef dType); | |
/// <summary> | |
/// uint32_t LLVMDITypeGetAlignInBits(LLVMMetadataRef DType) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the alignment of this DIType in bits. </para> | |
///<para> The DIType.</para> | |
///<para> DIType::getAlignInBits()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetAlignInBits", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint DITypeGetAlignInBits(LLVMMetadataRef dType); | |
/// <summary> | |
/// unsigned int LLVMDITypeGetLine(LLVMMetadataRef DType) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the source line where this DIType is declared. </para> | |
///<para> The DIType.</para> | |
///<para> DIType::getLine()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetLine", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint DITypeGetLine(LLVMMetadataRef dType); | |
/// <summary> | |
/// LLVMDIFlags LLVMDITypeGetFlags(LLVMMetadataRef DType) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the flags associated with this DIType. </para> | |
///<para> The DIType.</para> | |
///<para> DIType::getFlags()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDITypeGetFlags", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDIFlags DITypeGetFlags(LLVMMetadataRef dType); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef Builder, | |
/// int64_t LowerBound, | |
/// int64_t Count) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a descriptor for a value range. </para> | |
///<para> The DIBuilder. </para> | |
///<para> Lower bound of the subrange, e.g. 0 for C, 1 for Fortran. </para> | |
///<para> Count of elements in the subrange.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderGetOrCreateSubrange", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderGetOrCreateSubrange(LLVMDIBuilderRef builder, long lowerBound, long count); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef Builder, | |
/// LLVMMetadataRef *Data, | |
/// size_t NumElements) | |
/// </summary> | |
/// <remarks> | |
///<para> Create an array of DI Nodes. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The DI Node elements. </para> | |
///<para> Number of DI Node elements.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderGetOrCreateArray", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderGetOrCreateArray(LLVMDIBuilderRef builder, LLVMMetadataRef* data, UIntPtr numElements); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Builder, | |
/// int64_t *Addr, size_t Length) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for the specified variable which has a complex address expression for its address. </para> | |
///<para> The DIBuilder. </para> | |
///<para> An array of complex address operations. </para> | |
///<para> Length of the address operation array.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateExpression", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateExpression(LLVMDIBuilderRef builder, out long addr, UIntPtr length); | |
/// <summary> | |
/// LLVMMetadataRef | |
/// LLVMDIBuilderCreateConstantValueExpression(LLVMDIBuilderRef Builder, | |
/// int64_t Value) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for the specified variable that does not have an address, but does have a constant value. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The constant value.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateConstantValueExpression", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateConstantValueExpression(LLVMDIBuilderRef builder, long @value); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateGlobalVariableExpression( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, const char *Linkage, size_t LinkLen, LLVMMetadataRef File, | |
/// unsigned int LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, | |
/// LLVMMetadataRef Expr, LLVMMetadataRef Decl, uint32_t AlignInBits) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for the specified variable. </para> | |
///<para> Variable scope. </para> | |
///<para> Name of the variable. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> Mangled name of the variable. </para> | |
///<para> The length of the C string passed to Linkage.</para> | |
///<para> File where this variable is defined. </para> | |
///<para> Line number. </para> | |
///<para> Variable Type. </para> | |
///<para> Boolean flag indicate whether this variable is externally visible or not. </para> | |
///<para> The location of the global relative to the attached GlobalVariable. </para> | |
///<para> Reference to the corresponding declaration. </para> | |
///<para> Variable alignment(or 0 if no alignment attr was specified)</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateGlobalVariableExpression", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateGlobalVariableExpression(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, string linkage, UIntPtr linkLen, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef ty, LLVMBool localToUnit, LLVMMetadataRef expr, LLVMMetadataRef decl, uint alignInBits); | |
/// <summary> | |
/// LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef Ctx, LLVMMetadataRef *Data, | |
/// size_t NumElements) | |
/// </summary> | |
/// <remarks> | |
///<para> 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.</para> | |
///<para> The context in which to construct the temporary node. </para> | |
///<para> The metadata elements. </para> | |
///<para> Number of metadata elements.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMTemporaryMDNode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef TemporaryMDNode(LLVMContextRef ctx, LLVMMetadataRef* data, UIntPtr numElements); | |
/// <summary> | |
/// void LLVMDisposeTemporaryMDNode(LLVMMetadataRef TempNode) | |
/// </summary> | |
/// <remarks> | |
///<para> Deallocate a temporary node.</para> | |
///<para> The temporary metadata node.</para> | |
///<para> Calls replaceAllUsesWith(nullptr) before deleting, so any remaining references will be reset. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeTemporaryMDNode", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeTemporaryMDNode(LLVMMetadataRef tempNode); | |
/// <summary> | |
/// void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef TempTargetMetadata, | |
/// LLVMMetadataRef Replacement) | |
/// </summary> | |
/// <remarks> | |
///<para> Replace all uses of temporary metadata. </para> | |
///<para> The temporary metadata node. </para> | |
///<para> The replacement metadata node.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMMetadataReplaceAllUsesWith", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void MetadataReplaceAllUsesWith(LLVMMetadataRef tempTargetMetadata, LLVMMetadataRef replacement); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateTempGlobalVariableFwdDecl( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, const char *Linkage, size_t LnkLen, LLVMMetadataRef File, | |
/// unsigned int LineNo, LLVMMetadataRef Ty, LLVMBool LocalToUnit, | |
/// LLVMMetadataRef Decl, uint32_t AlignInBits) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for the specified global variable that is temporary and meant to be RAUWed. </para> | |
///<para> Variable scope. </para> | |
///<para> Name of the variable. </para> | |
///<para> The length of the C string passed to Name.</para> | |
///<para> Mangled name of the variable. </para> | |
///<para> The length of the C string passed to Linkage.</para> | |
///<para> File where this variable is defined. </para> | |
///<para> Line number. </para> | |
///<para> Variable Type. </para> | |
///<para> Boolean flag indicate whether this variable is externally visible or not. </para> | |
///<para> Reference to the corresponding declaration. </para> | |
///<para> Variable alignment(or 0 if no alignment attr was specified)</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateTempGlobalVariableFwdDecl", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateTempGlobalVariableFwdDecl(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, string linkage, UIntPtr lnkLen, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef ty, LLVMBool localToUnit, LLVMMetadataRef decl, uint alignInBits); | |
/// <summary> | |
/// LLVMValueRef | |
/// LLVMDIBuilderInsertDeclareBefore(LLVMDIBuilderRef Builder, LLVMValueRef Storage, | |
/// LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, | |
/// LLVMMetadataRef DebugLoc, LLVMValueRef Instr) | |
/// </summary> | |
/// <remarks> | |
///<para> Insert a new llvm.dbg.declare intrinsic call before the given instruction. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The storage of the variable to declare. </para> | |
///<para> The variable's debug info descriptor. </para> | |
///<para> A complex location expression for the variable. </para> | |
///<para> Debug info location. </para> | |
///<para> Instruction acting as a location for the new intrinsic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderInsertDeclareBefore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef DIBuilderInsertDeclareBefore(LLVMDIBuilderRef builder, LLVMValueRef storage, LLVMMetadataRef varInfo, LLVMMetadataRef expr, LLVMMetadataRef debugLoc, LLVMValueRef instr); | |
/// <summary> | |
/// LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd( | |
/// LLVMDIBuilderRef Builder, LLVMValueRef Storage, LLVMMetadataRef VarInfo, | |
/// LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block) | |
/// </summary> | |
/// <remarks> | |
///<para> 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. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The storage of the variable to declare. </para> | |
///<para> The variable's debug info descriptor. </para> | |
///<para> A complex location expression for the variable. </para> | |
///<para> Debug info location. </para> | |
///<para> Basic block acting as a location for the new intrinsic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderInsertDeclareAtEnd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef DIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef builder, LLVMValueRef storage, LLVMMetadataRef varInfo, LLVMMetadataRef expr, LLVMMetadataRef debugLoc, LLVMBasicBlockRef block); | |
/// <summary> | |
/// LLVMValueRef | |
/// LLVMDIBuilderInsertDbgValueBefore(LLVMDIBuilderRef Builder, LLVMValueRef Val, | |
/// LLVMMetadataRef VarInfo, LLVMMetadataRef Expr, | |
/// LLVMMetadataRef DebugLoc, LLVMValueRef Instr) | |
/// </summary> | |
/// <remarks> | |
///<para> Insert a new llvm.dbg.value intrinsic call before the given instruction. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The value of the variable. </para> | |
///<para> The variable's debug info descriptor. </para> | |
///<para> A complex location expression for the variable. </para> | |
///<para> Debug info location. </para> | |
///<para> Instruction acting as a location for the new intrinsic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderInsertDbgValueBefore", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef DIBuilderInsertDbgValueBefore(LLVMDIBuilderRef builder, LLVMValueRef val, LLVMMetadataRef varInfo, LLVMMetadataRef expr, LLVMMetadataRef debugLoc, LLVMValueRef instr); | |
/// <summary> | |
/// LLVMValueRef LLVMDIBuilderInsertDbgValueAtEnd( | |
/// LLVMDIBuilderRef Builder, LLVMValueRef Val, LLVMMetadataRef VarInfo, | |
/// LLVMMetadataRef Expr, LLVMMetadataRef DebugLoc, LLVMBasicBlockRef Block) | |
/// </summary> | |
/// <remarks> | |
///<para> 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. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The value of the variable. </para> | |
///<para> The variable's debug info descriptor. </para> | |
///<para> A complex location expression for the variable. </para> | |
///<para> Debug info location. </para> | |
///<para> Basic block acting as a location for the new intrinsic.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderInsertDbgValueAtEnd", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMValueRef DIBuilderInsertDbgValueAtEnd(LLVMDIBuilderRef builder, LLVMValueRef val, LLVMMetadataRef varInfo, LLVMMetadataRef expr, LLVMMetadataRef debugLoc, LLVMBasicBlockRef block); | |
/// <summary> | |
/// LLVMMetadataRef | |
/// LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, | |
/// const char *Name, size_t NameLen, | |
/// LLVMMetadataRef File, unsigned int LineNo, | |
/// LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, | |
/// LLVMDIFlags Flags, uint32_t AlignInBits) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for a local auto variable. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The local scope the variable is declared in. </para> | |
///<para> Variable name. </para> | |
///<para> Length of variable name. </para> | |
///<para> File where this variable is defined. </para> | |
///<para> Line number. </para> | |
///<para> Metadata describing the type of the variable. </para> | |
///<para> If true, this descriptor will survive optimizations. </para> | |
///<para> Flags. </para> | |
///<para> Variable alignment.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateAutoVariable", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateAutoVariable(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef ty, LLVMBool alwaysPreserve, LLVMDIFlags flags, uint alignInBits); | |
/// <summary> | |
/// LLVMMetadataRef LLVMDIBuilderCreateParameterVariable( | |
/// LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, | |
/// size_t NameLen, unsigned int ArgNo, LLVMMetadataRef File, | |
/// unsigned int LineNo, LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, | |
/// LLVMDIFlags Flags) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a new descriptor for a function parameter variable. </para> | |
///<para> The DIBuilder. </para> | |
///<para> The local scope the variable is declared in. </para> | |
///<para> Variable name. </para> | |
///<para> Length of variable name. </para> | |
///<para> Unique argument number for this variable; starts at 1. </para> | |
///<para> File where this variable is defined. </para> | |
///<para> Line number. </para> | |
///<para> Metadata describing the type of the variable. </para> | |
///<para> If true, this descriptor will survive optimizations. </para> | |
///<para> Flags.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDIBuilderCreateParameterVariable", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef DIBuilderCreateParameterVariable(LLVMDIBuilderRef builder, LLVMMetadataRef scope, string name, UIntPtr nameLen, uint argNo, LLVMMetadataRef file, uint lineNo, LLVMMetadataRef ty, LLVMBool alwaysPreserve, LLVMDIFlags flags); | |
/// <summary> | |
/// LLVMMetadataRef LLVMGetSubprogram(LLVMValueRef Func) | |
/// </summary> | |
/// <remarks> | |
///<para> Get the metadata of the subprogram attached to a function.</para> | |
///<para> llvm::Function::getSubprogram()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetSubprogram", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMetadataRef GetSubprogram(LLVMValueRef func); | |
/// <summary> | |
/// void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the subprogram attached to a function.</para> | |
///<para> llvm::Function::setSubprogram()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetSubprogram", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetSubprogram(LLVMValueRef func, LLVMMetadataRef sP); | |
/// <summary> | |
/// LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo, | |
/// int TagType, LLVMOpInfoCallback GetOpInfo, | |
/// LLVMSymbolLookupCallback SymbolLookUp) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a disassembler for the TripleName. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty CPU name and feature set.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateDisasm", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDisasmContextRef CreateDisasm(string tripleName, IntPtr disInfo, int tagType, LLVMOpInfoCallbackDelegate getOpInfo, LLVMSymbolLookupCallbackDelegate symbolLookUp); | |
/// <summary> | |
/// LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU, | |
/// void *DisInfo, int TagType, | |
/// LLVMOpInfoCallback GetOpInfo, | |
/// LLVMSymbolLookupCallback SymbolLookUp) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a disassembler for the TripleName and a specific CPU. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty feature set.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateDisasmCPU", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDisasmContextRef CreateDisasmCPU(string triple, string cPU, IntPtr disInfo, int tagType, LLVMOpInfoCallbackDelegate getOpInfo, LLVMSymbolLookupCallbackDelegate symbolLookUp); | |
/// <summary> | |
/// LLVMDisasmContextRef | |
/// LLVMCreateDisasmCPUFeatures(const char *Triple, const char *CPU, | |
/// const char *Features, void *DisInfo, int TagType, | |
/// LLVMOpInfoCallback GetOpInfo, | |
/// LLVMSymbolLookupCallback SymbolLookUp) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a disassembler for the TripleName, a specific CPU and specific feature string. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateDisasmCPUFeatures", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMDisasmContextRef CreateDisasmCPUFeatures(string triple, string cPU, string features, IntPtr disInfo, int tagType, LLVMOpInfoCallbackDelegate getOpInfo, LLVMSymbolLookupCallbackDelegate symbolLookUp); | |
/// <summary> | |
/// int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the disassembler's options. Returns 1 if it can set the Options and 0 otherwise.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetDisasmOptions", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int SetDisasmOptions(LLVMDisasmContextRef dC, ulong options); | |
/// <summary> | |
/// void LLVMDisasmDispose(LLVMDisasmContextRef DC) | |
/// </summary> | |
/// <remarks> | |
///<para> Dispose of a disassembler context.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisasmDispose", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisasmDispose(LLVMDisasmContextRef dC); | |
/// <summary> | |
/// size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes, | |
/// uint64_t BytesSize, uint64_t PC, char *OutString, | |
/// size_t OutStringSize) | |
/// </summary> | |
/// <remarks> | |
///<para> Disassemble a single instruction using the disassembler context specified in the parameter DC. The bytes of the instruction are specified in the parameter Bytes, and contains at least BytesSize number of bytes. The instruction is at the address specified by the PC parameter. If a valid instruction can be disassembled, its string is returned indirectly in OutString whose size is specified in the parameter OutStringSize. This function returns the number of bytes in the instruction or zero if there was no valid instruction.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisasmInstruction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern UIntPtr DisasmInstruction(LLVMDisasmContextRef dC, out byte bytes, ulong bytesSize, ulong pC, out byte outString, UIntPtr outStringSize); | |
/// <summary> | |
/// static inline void LLVMInitializeAllTargetInfos() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllTargetInfos", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllTargetInfos(); | |
/// <summary> | |
/// static inline void LLVMInitializeAllTargets() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllTargets", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllTargets(); | |
/// <summary> | |
/// static inline void LLVMInitializeAllTargetMCs() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllTargetMCs", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllTargetMCs(); | |
/// <summary> | |
/// static inline void LLVMInitializeAllAsmPrinters() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllAsmPrinters", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllAsmPrinters(); | |
/// <summary> | |
/// static inline void LLVMInitializeAllAsmParsers() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllAsmParsers", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllAsmParsers(); | |
/// <summary> | |
/// static inline void LLVMInitializeAllDisassemblers() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeAllDisassemblers", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeAllDisassemblers(); | |
/// <summary> | |
/// static inline LLVMBool LLVMInitializeNativeTarget() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeNativeTarget", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool InitializeNativeTarget(); | |
/// <summary> | |
/// static inline LLVMBool LLVMInitializeNativeAsmParser() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the parser for the native target corresponding to the host. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeNativeAsmParser", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool InitializeNativeAsmParser(); | |
/// <summary> | |
/// static inline LLVMBool LLVMInitializeNativeAsmPrinter() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the printer for the native target corresponding to the host. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeNativeAsmPrinter", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool InitializeNativeAsmPrinter(); | |
/// <summary> | |
/// static inline LLVMBool LLVMInitializeNativeDisassembler() | |
/// </summary> | |
/// <remarks> | |
///<para> LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the disassembler for the native target corresponding to the host. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMInitializeNativeDisassembler", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool InitializeNativeDisassembler(); | |
/// <summary> | |
/// LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M) | |
/// </summary> | |
/// <remarks> | |
///<para> Obtain the data layout for a module.</para> | |
///<para> Module::getDataLayout()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMGetModuleDataLayout", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTargetDataRef GetModuleDataLayout(LLVMModuleRef m); | |
/// <summary> | |
/// void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL) | |
/// </summary> | |
/// <remarks> | |
///<para> Set the data layout for a module.</para> | |
///<para> Module::setDataLayout()</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSetModuleDataLayout", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void SetModuleDataLayout(LLVMModuleRef m, LLVMTargetDataRef dL); | |
/// <summary> | |
/// LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep) | |
/// </summary> | |
/// <remarks> | |
///<para> Creates target data from a target layout string. See the constructor llvm::DataLayout::DataLayout. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateTargetData", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTargetDataRef CreateTargetData(string stringRep); | |
/// <summary> | |
/// void LLVMDisposeTargetData(LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Deallocates a TargetData. See the destructor llvm::DataLayout::~DataLayout. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMDisposeTargetData", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeTargetData(LLVMTargetDataRef tD); | |
/// <summary> | |
/// void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, | |
/// LLVMPassManagerRef PM) | |
/// </summary> | |
/// <remarks> | |
///<para> Adds target library information to a pass manager. This does not take ownership of the target library info. See the method llvm::PassManagerBase::add. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMAddTargetLibraryInfo", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddTargetLibraryInfo(LLVMTargetLibraryInfoRef tLI, LLVMPassManagerRef pM); | |
/// <summary> | |
/// char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCopyStringRepOfTargetData", CallingConvention=CallingConvention.Cdecl)] | |
public static extern byte* CopyStringRepOfTargetData(LLVMTargetDataRef tD); | |
/// <summary> | |
/// enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMByteOrder", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMByteOrdering ByteOrder(LLVMTargetDataRef tD); | |
/// <summary> | |
/// unsigned int LLVMPointerSize(LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPointerSize", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint PointerSize(LLVMTargetDataRef tD); | |
/// <summary> | |
/// unsigned int LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned int AS) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the pointer size in bytes for a target for a specified address space. See the method llvm::DataLayout::getPointerSize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPointerSizeForAS", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint PointerSizeForAS(LLVMTargetDataRef tD, uint aS); | |
/// <summary> | |
/// LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIntPtrType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntPtrType(LLVMTargetDataRef tD); | |
/// <summary> | |
/// LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned int AS) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIntPtrTypeForAS", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntPtrTypeForAS(LLVMTargetDataRef tD, uint aS); | |
/// <summary> | |
/// LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIntPtrTypeInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntPtrTypeInContext(LLVMContextRef c, LLVMTargetDataRef tD); | |
/// <summary> | |
/// LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, | |
/// unsigned int AS) | |
/// </summary> | |
/// <remarks> | |
///<para> Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMIntPtrTypeForASInContext", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTypeRef IntPtrTypeForASInContext(LLVMContextRef c, LLVMTargetDataRef tD, uint aS); | |
/// <summary> | |
/// unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the size of a type in bytes for a target. See the method llvm::DataLayout::getTypeSizeInBits. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMSizeOfTypeInBits", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong SizeOfTypeInBits(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMStoreSizeOfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong StoreSizeOfType(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMABISizeOfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong ABISizeOfType(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned int LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMABIAlignmentOfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint ABIAlignmentOfType(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned int LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCallFrameAlignmentOfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint CallFrameAlignmentOfType(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned int LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPreferredAlignmentOfType", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint PreferredAlignmentOfType(LLVMTargetDataRef tD, LLVMTypeRef ty); | |
/// <summary> | |
/// unsigned int LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, | |
/// LLVMValueRef GlobalVar) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMPreferredAlignmentOfGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint PreferredAlignmentOfGlobal(LLVMTargetDataRef tD, LLVMValueRef globalVar); | |
/// <summary> | |
/// unsigned int LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, | |
/// unsigned long long Offset) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMElementAtOffset", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint ElementAtOffset(LLVMTargetDataRef tD, LLVMTypeRef structTy, ulong offset); | |
/// <summary> | |
/// unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, | |
/// LLVMTypeRef StructTy, | |
/// unsigned int Element) | |
/// </summary> | |
/// <remarks> | |
///<para> Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset. </para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMOffsetOfElement", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong OffsetOfElement(LLVMTargetDataRef tD, LLVMTypeRef structTy, uint element); | |
/// <summary> | |
/// void LLVMLinkInMCJIT() | |
/// </summary> | |
/// <remarks> | |
///<para> @{</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMLinkInMCJIT", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void LinkInMCJIT(); | |
[DllImport(DLL, EntryPoint = "LLVMLinkInInterpreter", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void LinkInInterpreter(); | |
/// <summary> | |
/// LLVMGenericValueRef LLVMCreateGenericValueOfInt(LLVMTypeRef Ty, | |
/// unsigned long long N, | |
/// LLVMBool IsSigned) | |
/// </summary> | |
/// <remarks> | |
///<para>===-- Operations on generic values --------------------------------------===</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateGenericValueOfInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMGenericValueRef CreateGenericValueOfInt(LLVMTypeRef ty, ulong n, LLVMBool isSigned); | |
[DllImport(DLL, EntryPoint = "LLVMCreateGenericValueOfPointer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMGenericValueRef CreateGenericValueOfPointer(IntPtr p); | |
[DllImport(DLL, EntryPoint = "LLVMCreateGenericValueOfFloat", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMGenericValueRef CreateGenericValueOfFloat(LLVMTypeRef ty, double n); | |
[DllImport(DLL, EntryPoint = "LLVMGenericValueIntWidth", CallingConvention=CallingConvention.Cdecl)] | |
public static extern uint GenericValueIntWidth(LLVMGenericValueRef genValRef); | |
[DllImport(DLL, EntryPoint = "LLVMGenericValueToInt", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong GenericValueToInt(LLVMGenericValueRef genVal, LLVMBool isSigned); | |
[DllImport(DLL, EntryPoint = "LLVMGenericValueToPointer", CallingConvention=CallingConvention.Cdecl)] | |
public static extern IntPtr GenericValueToPointer(LLVMGenericValueRef genVal); | |
[DllImport(DLL, EntryPoint = "LLVMGenericValueToFloat", CallingConvention=CallingConvention.Cdecl)] | |
public static extern double GenericValueToFloat(LLVMTypeRef tyRef, LLVMGenericValueRef genVal); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeGenericValue", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeGenericValue(LLVMGenericValueRef genVal); | |
/// <summary> | |
/// LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE, | |
/// LLVMModuleRef M, char **OutError) | |
/// </summary> | |
/// <remarks> | |
///<para>===-- Operations on execution engines -----------------------------------===</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateExecutionEngineForModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateExecutionEngineForModule(LLVMExecutionEngineRef* outEE, LLVMModuleRef m, out byte* outError); | |
[DllImport(DLL, EntryPoint = "LLVMCreateInterpreterForModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateInterpreterForModule(LLVMExecutionEngineRef* outInterp, LLVMModuleRef m, out byte* outError); | |
[DllImport(DLL, EntryPoint = "LLVMCreateJITCompilerForModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateJITCompilerForModule(LLVMExecutionEngineRef* outJIT, LLVMModuleRef m, uint optLevel, out byte* outError); | |
[DllImport(DLL, EntryPoint = "LLVMInitializeMCJITCompilerOptions", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void InitializeMCJITCompilerOptions(LLVMMCJITCompilerOptions options, UIntPtr sizeOfOptions); | |
/// <summary> | |
/// LLVMBool | |
/// LLVMCreateMCJITCompilerForModule(LLVMExecutionEngineRef *OutJIT, | |
/// LLVMModuleRef M, | |
/// struct LLVMMCJITCompilerOptions *Options, | |
/// size_t SizeOfOptions, char **OutError) | |
/// </summary> | |
/// <remarks> | |
///<para> Create an MCJIT execution engine for a module, with the given options. It is the responsibility of the caller to ensure that all fields in Options up to the given SizeOfOptions are initialized. It is correct to pass a smaller value of SizeOfOptions that omits some fields. The canonical way of using this is:</para> | |
///<para> LLVMMCJITCompilerOptions options; LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); ... fill in those options you care about LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options), &error);</para> | |
///<para> Note that this is also correct, though possibly suboptimal:</para> | |
///<para> LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error);</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateMCJITCompilerForModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool CreateMCJITCompilerForModule(LLVMExecutionEngineRef* outJIT, LLVMModuleRef m, LLVMMCJITCompilerOptions options, UIntPtr sizeOfOptions, out byte* outError); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeExecutionEngine", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeExecutionEngine(LLVMExecutionEngineRef eE); | |
[DllImport(DLL, EntryPoint = "LLVMRunStaticConstructors", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RunStaticConstructors(LLVMExecutionEngineRef eE); | |
[DllImport(DLL, EntryPoint = "LLVMRunStaticDestructors", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void RunStaticDestructors(LLVMExecutionEngineRef eE); | |
[DllImport(DLL, EntryPoint = "LLVMRunFunctionAsMain", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int RunFunctionAsMain(LLVMExecutionEngineRef eE, LLVMValueRef f, uint argC, in byte* argV, in byte* envP); | |
[DllImport(DLL, EntryPoint = "LLVMRunFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMGenericValueRef RunFunction(LLVMExecutionEngineRef eE, LLVMValueRef f, uint numArgs, LLVMGenericValueRef* args); | |
[DllImport(DLL, EntryPoint = "LLVMFreeMachineCodeForFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void FreeMachineCodeForFunction(LLVMExecutionEngineRef eE, LLVMValueRef f); | |
[DllImport(DLL, EntryPoint = "LLVMAddModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddModule(LLVMExecutionEngineRef eE, LLVMModuleRef m); | |
[DllImport(DLL, EntryPoint = "LLVMRemoveModule", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool RemoveModule(LLVMExecutionEngineRef eE, LLVMModuleRef m, LLVMModuleRef* outMod, out byte* outError); | |
[DllImport(DLL, EntryPoint = "LLVMFindFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMBool FindFunction(LLVMExecutionEngineRef eE, string name, LLVMValueRef* outFn); | |
[DllImport(DLL, EntryPoint = "LLVMRecompileAndRelinkFunction", CallingConvention=CallingConvention.Cdecl)] | |
public static extern IntPtr RecompileAndRelinkFunction(LLVMExecutionEngineRef eE, LLVMValueRef fn); | |
[DllImport(DLL, EntryPoint = "LLVMGetExecutionEngineTargetData", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMTargetDataRef GetExecutionEngineTargetData(LLVMExecutionEngineRef eE); | |
[DllImport(DLL, EntryPoint = "LLVMGetExecutionEngineTargetMachine", CallingConvention=CallingConvention.Cdecl)] | |
public static extern int GetExecutionEngineTargetMachine(LLVMExecutionEngineRef eE); | |
[DllImport(DLL, EntryPoint = "LLVMAddGlobalMapping", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void AddGlobalMapping(LLVMExecutionEngineRef eE, LLVMValueRef @global, IntPtr addr); | |
[DllImport(DLL, EntryPoint = "LLVMGetPointerToGlobal", CallingConvention=CallingConvention.Cdecl)] | |
public static extern IntPtr GetPointerToGlobal(LLVMExecutionEngineRef eE, LLVMValueRef @global); | |
[DllImport(DLL, EntryPoint = "LLVMGetGlobalValueAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong GetGlobalValueAddress(LLVMExecutionEngineRef eE, string name); | |
[DllImport(DLL, EntryPoint = "LLVMGetFunctionAddress", CallingConvention=CallingConvention.Cdecl)] | |
public static extern ulong GetFunctionAddress(LLVMExecutionEngineRef eE, string name); | |
/// <summary> | |
/// LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager( | |
/// void *Opaque, | |
/// LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, | |
/// LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, | |
/// LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, | |
/// LLVMMemoryManagerDestroyCallback Destroy) | |
/// </summary> | |
/// <remarks> | |
///<para> Create a simple custom MCJIT memory manager. This memory manager can intercept allocations in a module-oblivious way. This will return NULL if any of the passed functions are NULL.</para> | |
///<para> An opaque client object to pass back to the callbacks. </para> | |
///<para> Allocate a block of memory for executable code. </para> | |
///<para> Allocate a block of memory for data. </para> | |
///<para> Set page permissions and flush cache. Return 0 on success, 1 on error.</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateSimpleMCJITMemoryManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMMCJITMemoryManagerRef CreateSimpleMCJITMemoryManager(IntPtr opaque, LLVMMemoryManagerAllocateCodeSectionCallbackDelegate allocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackDelegate allocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackDelegate finalizeMemory, LLVMMemoryManagerDestroyCallbackDelegate destroy); | |
[DllImport(DLL, EntryPoint = "LLVMDisposeMCJITMemoryManager", CallingConvention=CallingConvention.Cdecl)] | |
public static extern void DisposeMCJITMemoryManager(LLVMMCJITMemoryManagerRef mM); | |
/// <summary> | |
/// LLVMJITEventListenerRef LLVMCreateGDBRegistrationListener() | |
/// </summary> | |
/// <remarks> | |
///<para>===-- JIT Event Listener functions -------------------------------------===</para> | |
/// </remarks> | |
[DllImport(DLL, EntryPoint = "LLVMCreateGDBRegistrationListener", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMJITEventListenerRef CreateGDBRegistrationListener(); | |
[DllImport(DLL, EntryPoint = "LLVMCreateIntelJITEventListener", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMJITEventListenerRef CreateIntelJITEventListener(); | |
[DllImport(DLL, EntryPoint = "LLVMCreateOprofileJITEventListener", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMJITEventListenerRef CreateOprofileJITEventListener(); | |
[DllImport(DLL, EntryPoint = "LLVMCreatePerfJITEventListener", CallingConvention=CallingConvention.Cdecl)] | |
public static extern LLVMJITEventListenerRef CreatePerfJITEventListener(); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment