зеркало из https://github.com/dotnet/LLVMSharp.git
Regenerating bindings for LLVM v15.0.0
This commit is contained in:
Родитель
810f7a091a
Коммит
c6c318ea78
|
@ -124,8 +124,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
|
||||
public LLVMValueRef BuildBr(LLVMBasicBlockRef Dest) => LLVM.BuildBr(this, Dest);
|
||||
|
||||
[Obsolete("Use BuildCall2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildCall(LLVMValueRef Fn, LLVMValueRef[] Args, string Name = "") => BuildCall(Fn, Args.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildCall2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildCall(LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
|
@ -135,6 +137,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildCall2(LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef[] Args, string Name = "") => BuildCall2(Ty, Fn, Args.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildCall2(LLVMTypeRef Ty, LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildCall2(this, Ty, Fn, (LLVMOpaqueValue**)pArgs, (uint)Args.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildCast(LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, string Name = "") => BuildCast(Op, Val, DestTy, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildCast(LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, ReadOnlySpan<char> Name)
|
||||
|
@ -283,8 +296,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildFSub(this, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildGEP(LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildGEP(Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildGEP(LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
|
@ -294,6 +309,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildGEP2(Ty, Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildGEP2(this, Ty, Pointer, (LLVMOpaqueValue**)pIndices, (uint)Indices.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildGlobalString(string Str, string Name = "") => BuildGlobalString(Str.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildGlobalString(ReadOnlySpan<char> Str, ReadOnlySpan<char> Name)
|
||||
|
@ -320,8 +346,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildICmp(this, Op, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildInBoundsGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInBoundsGEP(LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildInBoundsGEP(Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildInBoundsGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInBoundsGEP(LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
|
@ -331,6 +359,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef[] Indices, string Name = "") => BuildInBoundsGEP2(Ty, Pointer, Indices.AsSpan(), Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, ReadOnlySpan<LLVMValueRef> Indices, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pIndices = Indices)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildInBoundsGEP2(this, Ty, Pointer, (LLVMOpaqueValue**)pIndices, (uint)Indices.Length, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildIndirectBr(LLVMValueRef Addr, uint NumDests) => LLVM.BuildIndirectBr(this, Addr, NumDests);
|
||||
|
||||
public LLVMValueRef BuildInsertElement(LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, string Name = "") => BuildInsertElement(VecVal, EltVal, Index, Name.AsSpan());
|
||||
|
@ -365,8 +404,10 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildIntToPtr(this, Val, DestTy, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildInvoke2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInvoke(LLVMValueRef Fn, LLVMValueRef[] Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, string Name = "") => BuildInvoke(Fn, Args.AsSpan(), Then, Catch, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildInvoke2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildInvoke(LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
|
@ -376,6 +417,17 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildInvoke2(LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef[] Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, string Name = "") => BuildInvoke2(Ty, Fn, Args.AsSpan(), Then, Catch, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildInvoke2(LLVMTypeRef Ty, LLVMValueRef Fn, ReadOnlySpan<LLVMValueRef> Args, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, ReadOnlySpan<char> Name)
|
||||
{
|
||||
fixed (LLVMValueRef* pArgs = Args)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildInvoke2(this, Ty, Fn, (LLVMOpaqueValue**)pArgs, (uint)Args.Length, Then, Catch, marshaledName);
|
||||
}
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildIsNotNull(LLVMValueRef Val, string Name = "") => BuildIsNotNull(Val, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildIsNotNull(LLVMValueRef Val, ReadOnlySpan<char> Name)
|
||||
|
@ -400,14 +452,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildLandingPad(this, Ty, PersFn, NumClauses, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildLoad2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildLoad(LLVMValueRef PointerVal, string Name = "") => BuildLoad(PointerVal, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildLoad2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildLoad(LLVMValueRef PointerVal, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildLoad(this, PointerVal, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildLoad2(LLVMTypeRef Ty, LLVMValueRef PointerVal, string Name = "") => BuildLoad2(Ty, PointerVal, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildLoad2(LLVMTypeRef Ty, LLVMValueRef PointerVal, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildLoad2(this, Ty, PointerVal, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildLShr(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildLShr(LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildLShr(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
|
@ -536,14 +598,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
return LLVM.BuildPointerCast(this, Val, DestTy, marshaledName);
|
||||
}
|
||||
|
||||
[Obsolete("Use BuildPtrDiff2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildPtrDiff(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildPtrDiff(LHS, RHS, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildPtrDiff2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildPtrDiff(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildPtrDiff(this, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildPtrDiff2(LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildPtrDiff2(ElemTy, LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildPtrDiff2(LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildPtrDiff2(this, ElemTy, LHS, RHS, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildPtrToInt(LLVMValueRef Val, LLVMTypeRef DestTy, string Name = "") => BuildPtrToInt(Val, DestTy, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildPtrToInt(LLVMValueRef Val, LLVMTypeRef DestTy, ReadOnlySpan<char> Name)
|
||||
|
@ -624,14 +696,24 @@ public unsafe partial struct LLVMBuilderRef : IDisposable, IEquatable<LLVMBuilde
|
|||
|
||||
public LLVMValueRef BuildStore(LLVMValueRef Val, LLVMValueRef Ptr) => LLVM.BuildStore(this, Val, Ptr);
|
||||
|
||||
[Obsolete("Use BuildStructGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildStructGEP(LLVMValueRef Pointer, uint Idx, string Name = "") => BuildStructGEP(Pointer, Idx, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use BuildStructGEP2 instead to support opaque pointer")]
|
||||
public LLVMValueRef BuildStructGEP(LLVMValueRef Pointer, uint Idx, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildStructGEP(this, Pointer, Idx, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildStructGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, uint Idx, string Name = "") => BuildStructGEP2(Ty, Pointer, Idx, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildStructGEP2(LLVMTypeRef Ty, LLVMValueRef Pointer, uint Idx, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.BuildStructGEP2(this, Ty, Pointer, Idx, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef BuildSub(LLVMValueRef LHS, LLVMValueRef RHS, string Name = "") => BuildSub(LHS, RHS, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef BuildSub(LLVMValueRef LHS, LLVMValueRef RHS, ReadOnlySpan<char> Name)
|
||||
|
|
|
@ -195,16 +195,26 @@ public unsafe partial struct LLVMContextRef : IDisposable, IEquatable<LLVMContex
|
|||
return M;
|
||||
}
|
||||
|
||||
public void SetDiagnosticHandler(LLVMDiagnosticHandler Handler, IntPtr DiagnosticContext)
|
||||
public void SetDiagnosticHandler(LLVMDiagnosticHandler Handler, void* DiagnosticContext)
|
||||
{
|
||||
var pHandler = Marshal.GetFunctionPointerForDelegate(Handler);
|
||||
LLVM.ContextSetDiagnosticHandler(this, pHandler, (void*)DiagnosticContext);
|
||||
var pHandler = (delegate* unmanaged[Cdecl] < LLVMOpaqueDiagnosticInfo *, void *, void > )Marshal.GetFunctionPointerForDelegate(Handler);
|
||||
SetDiagnosticHandler(pHandler, DiagnosticContext);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(LLVMYieldCallback Callback, IntPtr OpaqueHandle)
|
||||
public void SetDiagnosticHandler(delegate* unmanaged[Cdecl]<LLVMOpaqueDiagnosticInfo*, void*, void> Handler, void* DiagnosticContext)
|
||||
{
|
||||
var pCallback = Marshal.GetFunctionPointerForDelegate(Callback);
|
||||
LLVM.ContextSetYieldCallback(this, pCallback, (void*)OpaqueHandle);
|
||||
LLVM.ContextSetDiagnosticHandler(this, Handler, DiagnosticContext);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(LLVMYieldCallback Callback, void* OpaqueHandle)
|
||||
{
|
||||
var pCallback = (delegate* unmanaged[Cdecl] < LLVMOpaqueContext *, void *, void>)Marshal.GetFunctionPointerForDelegate(Callback);
|
||||
SetYieldCallback(pCallback, OpaqueHandle);
|
||||
}
|
||||
|
||||
public void SetYieldCallback(delegate* unmanaged[Cdecl]<LLVMOpaqueContext*, void*, void> Callback, void* OpaqueHandle)
|
||||
{
|
||||
LLVM.ContextSetYieldCallback(this, Callback, OpaqueHandle);
|
||||
}
|
||||
|
||||
public override string ToString() => $"{nameof(LLVMContextRef)}: {Handle:X}";
|
||||
|
|
|
@ -94,14 +94,24 @@ public unsafe partial struct LLVMModuleRef : IDisposable, IEquatable<LLVMModuleR
|
|||
return LLVM.ModuleCreateWithName(marshaledModuleID);
|
||||
}
|
||||
|
||||
[Obsolete("Use AddAlias2 instead to support opaque pointer")]
|
||||
public LLVMValueRef AddAlias(LLVMTypeRef Ty, LLVMValueRef Aliasee, string Name) => AddAlias(Ty, Aliasee, Name.AsSpan());
|
||||
|
||||
[Obsolete("Use AddAlias2 instead to support opaque pointer")]
|
||||
public LLVMValueRef AddAlias(LLVMTypeRef Ty, LLVMValueRef Aliasee, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.AddAlias(this, Ty, Aliasee, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef AddAlias2(LLVMTypeRef ValueTy, uint AddrSpace, LLVMValueRef Aliasee, string Name) => AddAlias2(ValueTy, AddrSpace, Aliasee, Name.AsSpan());
|
||||
|
||||
public LLVMValueRef AddAlias2(LLVMTypeRef ValueTy, uint AddrSpace, LLVMValueRef Aliasee, ReadOnlySpan<char> Name)
|
||||
{
|
||||
using var marshaledName = new MarshaledString(Name);
|
||||
return LLVM.AddAlias2(this, ValueTy, AddrSpace, Aliasee, marshaledName);
|
||||
}
|
||||
|
||||
public LLVMValueRef AddFunction(string Name, LLVMTypeRef FunctionTy) => AddFunction(Name.AsSpan(), FunctionTy);
|
||||
|
||||
public LLVMValueRef AddFunction(ReadOnlySpan<char> Name, LLVMTypeRef FunctionTy)
|
||||
|
|
|
@ -40,11 +40,6 @@ public unsafe partial struct LLVMPassManagerBuilderRef : IEquatable<LLVMPassMana
|
|||
|
||||
public void PopulateModulePassManager(LLVMPassManagerRef PM) => LLVM.PassManagerBuilderPopulateModulePassManager(this, PM);
|
||||
|
||||
public void PopulateLTOPassManager(LLVMPassManagerRef PM, int Internalize, int RunInliner)
|
||||
{
|
||||
LLVM.PassManagerBuilderPopulateLTOPassManager(this, PM, Internalize, RunInliner);
|
||||
}
|
||||
|
||||
public void SetSizeLevel(uint SizeLevel) => LLVM.PassManagerBuilderSetSizeLevel(this, SizeLevel);
|
||||
|
||||
public void SetDisableUnitAtATime(int Value) => LLVM.PassManagerBuilderSetDisableUnitAtATime(this, Value);
|
||||
|
|
|
@ -29,8 +29,6 @@ public unsafe partial struct LLVMPassManagerRef : IDisposable, IEquatable<LLVMPa
|
|||
|
||||
public void AddAlwaysInlinerPass() => LLVM.AddAlwaysInlinerPass(this);
|
||||
|
||||
public void AddArgumentPromotionPass() => LLVM.AddArgumentPromotionPass(this);
|
||||
|
||||
public void AddBasicAliasAnalysisPass() => LLVM.AddBasicAliasAnalysisPass(this);
|
||||
|
||||
public void AddBitTrackingDCEPass() => LLVM.AddBitTrackingDCEPass(this);
|
||||
|
@ -87,8 +85,6 @@ public unsafe partial struct LLVMPassManagerRef : IDisposable, IEquatable<LLVMPa
|
|||
|
||||
public void AddLoopUnrollPass() => LLVM.AddLoopUnrollPass(this);
|
||||
|
||||
public void AddLoopUnswitchPass() => LLVM.AddLoopUnswitchPass(this);
|
||||
|
||||
public void AddLoopVectorizePass() => LLVM.AddLoopVectorizePass(this);
|
||||
|
||||
public void AddLowerConstantIntrinsicsPass() => LLVM.AddLowerConstantIntrinsicsPass(this);
|
||||
|
|
|
@ -699,28 +699,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstBitCast(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstExactSDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExactUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstExactUDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant) => LLVM.ConstExtractElement(VectorConstant, IndexConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstExtractValue(LLVMValueRef AggConstant, uint[] IdxList) => CreateConstExtractValue(AggConstant, IdxList.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstExtractValue(LLVMValueRef AggConstant, ReadOnlySpan<uint> IdxList)
|
||||
{
|
||||
fixed (uint* pIdxList = IdxList)
|
||||
{
|
||||
return LLVM.ConstExtractValue(AggConstant, pIdxList, (uint)IdxList.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstFAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFAdd(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFMul(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFNeg(LLVMValueRef ConstantVal) => LLVM.ConstFNeg(ConstantVal);
|
||||
|
||||
public static LLVMValueRef CreateConstFPCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstFPCast(ConstantVal, ToType);
|
||||
|
@ -733,12 +713,10 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstFPTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstFPTrunc(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstFRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFRem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstFSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstFSub(LHSConstant, RHSConstant);
|
||||
|
||||
[Obsolete("Use CreateConstGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstGEP(LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstGEP(ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
[Obsolete("Use CreateConstGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstGEP(LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
|
@ -747,8 +725,20 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstGEP2(Ty, ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
{
|
||||
return LLVM.ConstGEP2(Ty, ConstantVal, (LLVMOpaqueValue**)pConstantIndices, (uint)ConstantIndices.Length);
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Use CreateConstInBoundsGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstInBoundsGEP(LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstInBoundsGEP(ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
[Obsolete("Use CreateConstInBoundsGEP2 instead to support opaque pointer")]
|
||||
public static LLVMValueRef CreateConstInBoundsGEP(LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
|
@ -757,6 +747,16 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef[] ConstantIndices) => CreateConstInBoundsGEP2(Ty, ConstantVal, ConstantIndices.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, ReadOnlySpan<LLVMValueRef> ConstantIndices)
|
||||
{
|
||||
fixed (LLVMValueRef* pConstantIndices = ConstantIndices)
|
||||
{
|
||||
return LLVM.ConstInBoundsGEP2(Ty, ConstantVal, (LLVMOpaqueValue**)pConstantIndices, (uint)ConstantIndices.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInlineAsm(LLVMTypeRef Ty, string AsmString, string Constraints, bool HasSideEffects, bool IsAlignStack) => CreateConstInlineAsm(Ty, AsmString.AsSpan(), Constraints.AsSpan(), HasSideEffects, IsAlignStack);
|
||||
|
||||
public static LLVMValueRef CreateConstInlineAsm(LLVMTypeRef Ty, ReadOnlySpan<char> AsmString, ReadOnlySpan<char> Constraints, bool HasSideEffects, bool IsAlignStack)
|
||||
|
@ -768,16 +768,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstInsertElement(LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant) => LLVM.ConstInsertElement(VectorConstant, ElementValueConstant, IndexConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstInsertValue(LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, uint[] IdxList) => CreateConstInsertValue(AggConstant, ElementValueConstant, IdxList.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstInsertValue(LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, ReadOnlySpan<uint> IdxList)
|
||||
{
|
||||
fixed (uint* pIdxList = IdxList)
|
||||
{
|
||||
return LLVM.ConstInsertValue(AggConstant, ElementValueConstant, pIdxList, (uint)IdxList.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstInt(LLVMTypeRef IntTy, ulong N, bool SignExtend = false) => LLVM.ConstInt(IntTy, N, SignExtend ? 1 : 0);
|
||||
|
||||
public static LLVMValueRef CreateConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, bool isSigned) => LLVM.ConstIntCast(ConstantVal, ToType, isSigned ? 1 : 0);
|
||||
|
@ -872,8 +862,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return LLVM.ConstRealOfStringAndSize(RealTy, marshaledText, (uint)marshaledText.Length);
|
||||
}
|
||||
|
||||
public static LLVMValueRef CreateConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstSDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstSelect(LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, LLVMValueRef ConstantIfFalse) => LLVM.ConstSelect(ConstantCondition, ConstantIfTrue, ConstantIfFalse);
|
||||
|
||||
public static LLVMValueRef CreateConstSExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstSExt(ConstantVal, ToType);
|
||||
|
@ -886,8 +874,6 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstSIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstSIToFP(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstSRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstSRem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstStruct(LLVMValueRef[] ConstantVals, bool Packed) => CreateConstStruct(ConstantVals.AsSpan(), Packed);
|
||||
|
||||
public static LLVMValueRef CreateConstStruct(ReadOnlySpan<LLVMValueRef> ConstantVals, bool Packed)
|
||||
|
@ -904,12 +890,8 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
|
||||
public static LLVMValueRef CreateConstTruncOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstTruncOrBitCast(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstUDiv(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstUIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType) => LLVM.ConstUIToFP(ConstantVal, ToType);
|
||||
|
||||
public static LLVMValueRef CreateConstURem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) => LLVM.ConstURem(LHSConstant, RHSConstant);
|
||||
|
||||
public static LLVMValueRef CreateConstVector(LLVMValueRef[] ScalarConstantVars) => CreateConstVector(ScalarConstantVars.AsSpan());
|
||||
|
||||
public static LLVMValueRef CreateConstVector(ReadOnlySpan<LLVMValueRef> ScalarConstantVars)
|
||||
|
@ -1037,6 +1019,9 @@ public unsafe partial struct LLVMValueRef : IEquatable<LLVMValueRef>
|
|||
return result;
|
||||
}
|
||||
|
||||
public LLVMValueRef GetAggregateElement(uint idx) => LLVM.GetAggregateElement(this, idx);
|
||||
|
||||
[Obsolete("Use GetAggregateElement instead")]
|
||||
public LLVMValueRef GetElementAsConstant(uint idx) => LLVM.GetElementAsConstant(this, idx);
|
||||
|
||||
public override int GetHashCode() => Handle.GetHashCode();
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -20,4 +20,6 @@ public enum LLVMAtomicRMWBinOp
|
|||
LLVMAtomicRMWBinOpUMin,
|
||||
LLVMAtomicRMWBinOpFAdd,
|
||||
LLVMAtomicRMWBinOpFSub,
|
||||
LLVMAtomicRMWBinOpFMax,
|
||||
LLVMAtomicRMWBinOpFMin,
|
||||
}
|
||||
|
|
|
@ -22,4 +22,5 @@ public enum LLVMBinaryType
|
|||
LLVMBinaryTypeMachO64L,
|
||||
LLVMBinaryTypeMachO64B,
|
||||
LLVMBinaryTypeWasm,
|
||||
LLVMBinaryTypeOffload,
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace LLVMSharp.Interop;
|
|||
[Flags]
|
||||
public enum LLVMJITSymbolGenericFlags : uint
|
||||
{
|
||||
LLVMJITSymbolGenericFlagsNone = 0,
|
||||
LLVMJITSymbolGenericFlagsExported = 1U << 0,
|
||||
LLVMJITSymbolGenericFlagsWeak = 1U << 1,
|
||||
LLVMJITSymbolGenericFlagsCallable = 1U << 2,
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public enum LLVMMetadataKind
|
||||
{
|
||||
LLVMMDStringMetadataKind,
|
||||
LLVMConstantAsMetadataMetadataKind,
|
||||
LLVMLocalAsMetadataMetadataKind,
|
||||
LLVMDistinctMDOperandPlaceholderMetadataKind,
|
||||
LLVMMDTupleMetadataKind,
|
||||
LLVMDILocationMetadataKind,
|
||||
LLVMDIExpressionMetadataKind,
|
||||
LLVMDIGlobalVariableExpressionMetadataKind,
|
||||
LLVMGenericDINodeMetadataKind,
|
||||
LLVMDISubrangeMetadataKind,
|
||||
LLVMDIEnumeratorMetadataKind,
|
||||
LLVMDIBasicTypeMetadataKind,
|
||||
LLVMDIDerivedTypeMetadataKind,
|
||||
LLVMDICompositeTypeMetadataKind,
|
||||
LLVMDISubroutineTypeMetadataKind,
|
||||
LLVMDIFileMetadataKind,
|
||||
LLVMDICompileUnitMetadataKind,
|
||||
LLVMDISubprogramMetadataKind,
|
||||
LLVMDILexicalBlockMetadataKind,
|
||||
LLVMDILexicalBlockFileMetadataKind,
|
||||
LLVMDINamespaceMetadataKind,
|
||||
LLVMDIModuleMetadataKind,
|
||||
LLVMDITemplateTypeParameterMetadataKind,
|
||||
LLVMDITemplateValueParameterMetadataKind,
|
||||
LLVMDIGlobalVariableMetadataKind,
|
||||
LLVMDILocalVariableMetadataKind,
|
||||
LLVMDILabelMetadataKind,
|
||||
LLVMDIObjCPropertyMetadataKind,
|
||||
LLVMDIImportedEntityMetadataKind,
|
||||
LLVMDIMacroMetadataKind,
|
||||
LLVMDIMacroFileMetadataKind,
|
||||
LLVMDICommonBlockMetadataKind,
|
||||
LLVMDIStringTypeMetadataKind,
|
||||
LLVMDIGenericSubrangeMetadataKind,
|
||||
LLVMDIArgListMetadataKind,
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe partial struct LLVMOrcCJITDylibSearchOrderElement
|
||||
{
|
||||
[NativeTypeName("LLVMOrcJITDylibRef")]
|
||||
public LLVMOrcOpaqueJITDylib* JD;
|
||||
|
||||
public LLVMOrcJITDylibLookupFlags JDLookupFlags;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe partial struct LLVMOrcCSymbolMapPair
|
||||
{
|
||||
[NativeTypeName("LLVMOrcSymbolStringPoolEntryRef")]
|
||||
public LLVMOrcOpaqueSymbolStringPoolEntry* Name;
|
||||
|
||||
public LLVMJITEvaluatedSymbol Sym;
|
||||
}
|
|
@ -3,8 +3,6 @@
|
|||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe partial struct LLVMOrcCSymbolsList
|
||||
|
@ -13,5 +11,5 @@ public unsafe partial struct LLVMOrcCSymbolsList
|
|||
public LLVMOrcOpaqueSymbolStringPoolEntry** Symbols;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public UIntPtr Length;
|
||||
public nuint Length;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public unsafe partial struct LTOObjectBuffer
|
||||
|
@ -13,5 +11,5 @@ public unsafe partial struct LTOObjectBuffer
|
|||
public sbyte* Buffer;
|
||||
|
||||
[NativeTypeName("size_t")]
|
||||
public UIntPtr Size;
|
||||
public nuint Size;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
|
||||
|
||||
// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-15.0.0/llvm/include/llvm-c
|
||||
// Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information.
|
||||
|
||||
namespace LLVMSharp.Interop;
|
||||
|
||||
public enum LLVMMetadataKind
|
||||
{
|
||||
LLVMMDStringMetadataKind = 0,
|
||||
LLVMConstantAsMetadataMetadataKind = 1,
|
||||
LLVMLocalAsMetadataMetadataKind = 2,
|
||||
LLVMDistinctMDOperandPlaceholderMetadataKind = 3,
|
||||
LLVMMDTupleMetadataKind = 4,
|
||||
LLVMDILocationMetadataKind = 5,
|
||||
LLVMDIExpressionMetadataKind = 6,
|
||||
LLVMDIGlobalVariableExpressionMetadataKind = 7,
|
||||
LLVMGenericDINodeMetadataKind = 8,
|
||||
LLVMDISubrangeMetadataKind = 9,
|
||||
LLVMDIEnumeratorMetadataKind = 10,
|
||||
LLVMDIBasicTypeMetadataKind = 11,
|
||||
LLVMDIDerivedTypeMetadataKind = 12,
|
||||
LLVMDICompositeTypeMetadataKind = 13,
|
||||
LLVMDISubroutineTypeMetadataKind = 14,
|
||||
LLVMDIFileMetadataKind = 15,
|
||||
LLVMDICompileUnitMetadataKind = 16,
|
||||
LLVMDISubprogramMetadataKind = 17,
|
||||
LLVMDILexicalBlockMetadataKind = 18,
|
||||
LLVMDILexicalBlockFileMetadataKind = 19,
|
||||
LLVMDINamespaceMetadataKind = 20,
|
||||
LLVMDIModuleMetadataKind = 21,
|
||||
LLVMDITemplateTypeParameterMetadataKind = 22,
|
||||
LLVMDITemplateValueParameterMetadataKind = 23,
|
||||
LLVMDIGlobalVariableMetadataKind = 24,
|
||||
LLVMDILocalVariableMetadataKind = 25,
|
||||
LLVMDILabelMetadataKind = 26,
|
||||
LLVMDIObjCPropertyMetadataKind = 27,
|
||||
LLVMDIImportedEntityMetadataKind = 28,
|
||||
LLVMDIMacroMetadataKind = 29,
|
||||
LLVMDIMacroFileMetadataKind = 30,
|
||||
LLVMDICommonBlockMetadataKind = 31,
|
||||
LLVMDIStringTypeMetadataKind = 32,
|
||||
LLVMDIGenericSubrangeMetadataKind = 33,
|
||||
LLVMDIArgListMetadataKind = 34,
|
||||
}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче