Skip to content

Commit fae47c1

Browse files
committed
Resolving some conflicts and missing manually defined methods
1 parent 49d895d commit fae47c1

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

sources/LLVMSharp.Interop/Extensions/LLVM.Manual.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public static unsafe partial class LLVM
5151
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZTargetInfo", ExactSpelling = true)]
5252
public static extern void InitializeSystemZTargetInfo();
5353

54+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVETargetInfo", ExactSpelling = true)]
55+
public static extern void InitializeVETargetInfo();
56+
5457
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyTargetInfo", ExactSpelling = true)]
5558
public static extern void InitializeWebAssemblyTargetInfo();
5659

@@ -102,6 +105,9 @@ public static unsafe partial class LLVM
102105
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZTarget", ExactSpelling = true)]
103106
public static extern void InitializeSystemZTarget();
104107

108+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVETarget", ExactSpelling = true)]
109+
public static extern void InitializeVETarget();
110+
105111
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyTarget", ExactSpelling = true)]
106112
public static extern void InitializeWebAssemblyTarget();
107113

@@ -153,6 +159,9 @@ public static unsafe partial class LLVM
153159
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZTargetMC", ExactSpelling = true)]
154160
public static extern void InitializeSystemZTargetMC();
155161

162+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVETargetMC", ExactSpelling = true)]
163+
public static extern void InitializeVETargetMC();
164+
156165
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyTargetMC", ExactSpelling = true)]
157166
public static extern void InitializeWebAssemblyTargetMC();
158167

@@ -204,6 +213,9 @@ public static unsafe partial class LLVM
204213
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZAsmPrinter", ExactSpelling = true)]
205214
public static extern void InitializeSystemZAsmPrinter();
206215

216+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVEAsmPrinter", ExactSpelling = true)]
217+
public static extern void InitializeVEAsmPrinter();
218+
207219
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyAsmPrinter", ExactSpelling = true)]
208220
public static extern void InitializeWebAssemblyAsmPrinter();
209221

@@ -252,6 +264,9 @@ public static unsafe partial class LLVM
252264
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZAsmParser", ExactSpelling = true)]
253265
public static extern void InitializeSystemZAsmParser();
254266

267+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVEAsmParser", ExactSpelling = true)]
268+
public static extern void InitializeVEAsmParser();
269+
255270
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyAsmParser", ExactSpelling = true)]
256271
public static extern void InitializeWebAssemblyAsmParser();
257272

@@ -297,6 +312,9 @@ public static unsafe partial class LLVM
297312
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeSystemZDisassembler", ExactSpelling = true)]
298313
public static extern void InitializeSystemZDisassembler();
299314

315+
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeVEDisassembler", ExactSpelling = true)]
316+
public static extern void InitializeVEDisassembler();
317+
300318
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeWebAssemblyDisassembler", ExactSpelling = true)]
301319
public static extern void InitializeWebAssemblyDisassembler();
302320

sources/LLVMSharp.Interop/Extensions/LLVMPassManagerBuilderRef.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public void PopulateLTOPassManager(LLVMPassManagerRef PM, int Internalize, int R
4545
LLVM.PassManagerBuilderPopulateLTOPassManager(this, PM, Internalize, RunInliner);
4646
}
4747

48-
public void SetOptLevel(uint OptLevel) => LLVM.PassManagerBuilderSetOptLevel(this, OptLevel);
49-
5048
public void SetSizeLevel(uint SizeLevel) => LLVM.PassManagerBuilderSetSizeLevel(this, SizeLevel);
5149

5250
public void SetDisableUnitAtATime(int Value) => LLVM.PassManagerBuilderSetDisableUnitAtATime(this, Value);

sources/LLVMSharp.Interop/Extensions/LLVMValueRef.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -872,25 +872,25 @@ public LLVMAttributeRef[] GetAttributesAtIndex(LLVMAttributeIndex Idx)
872872

873873
fixed (LLVMAttributeRef* pAttrs = Attrs)
874874
{
875-
LLVM.GetAttributesAtIndex(this, (uint)Idx, (LLVMOpaqueAttributeRef**)pAttrs);
875+
LLVM.GetAttributesAtIndex(this, Idx, (LLVMOpaqueAttributeRef**)pAttrs);
876876
}
877877

878878
return Attrs;
879879
}
880880

881-
public uint GetAttributeCountAtIndex(LLVMAttributeIndex Idx) => LLVM.GetAttributeCountAtIndex(this, (uint)Idx);
881+
public uint GetAttributeCountAtIndex(LLVMAttributeIndex Idx) => LLVM.GetAttributeCountAtIndex(this, Idx);
882882

883883
public LLVMValueRef GetBlockAddress(LLVMBasicBlockRef BB) => LLVM.BlockAddress(this, BB);
884884

885-
public uint GetCallSiteAttributeCount(LLVMAttributeIndex Idx) => LLVM.GetCallSiteAttributeCount(this, (uint)Idx);
885+
public uint GetCallSiteAttributeCount(LLVMAttributeIndex Idx) => LLVM.GetCallSiteAttributeCount(this, Idx);
886886

887887
public LLVMAttributeRef[] GetCallSiteAttributes(LLVMAttributeIndex Idx)
888888
{
889889
var Attrs = new LLVMAttributeRef[GetCallSiteAttributeCount(Idx)];
890890

891891
fixed (LLVMAttributeRef* pAttrs = Attrs)
892892
{
893-
LLVM.GetCallSiteAttributes(this, (uint)Idx, (LLVMOpaqueAttributeRef**)pAttrs);
893+
LLVM.GetCallSiteAttributes(this, Idx, (LLVMOpaqueAttributeRef**)pAttrs);
894894
}
895895

896896
return Attrs;
@@ -963,7 +963,7 @@ public void SetAlignment(uint Bytes)
963963
Alignment = Bytes;
964964
}
965965

966-
public void SetInstrParamAlignment(uint index, uint align) => LLVM.SetInstrParamAlignment(this, index, align);
966+
public void SetInstrParamAlignment(LLVMAttributeIndex index, uint align) => LLVM.SetInstrParamAlignment(this, index, align);
967967

968968
public void SetMetadata(uint KindID, LLVMValueRef Node) => LLVM.SetMetadata(this, KindID, Node);
969969

sources/LLVMSharp.Interop/LLVM.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3434,9 +3434,6 @@ public static unsafe partial class LLVM
34343434
[return: NativeTypeName("LLVMJITEventListenerRef")]
34353435
public static extern LLVMOpaqueJITEventListener* CreatePerfJITEventListener();
34363436

3437-
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeCore", ExactSpelling = true)]
3438-
public static extern void InitializeCore([NativeTypeName("LLVMPassRegistryRef")] LLVMOpaquePassRegistry* R);
3439-
34403437
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMInitializeTransformUtils", ExactSpelling = true)]
34413438
public static extern void InitializeTransformUtils([NativeTypeName("LLVMPassRegistryRef")] LLVMOpaquePassRegistry* R);
34423439

@@ -4851,9 +4848,6 @@ public static int InitializeNativeDisassembler()
48514848
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMAddIndVarSimplifyPass", ExactSpelling = true)]
48524849
public static extern void AddIndVarSimplifyPass([NativeTypeName("LLVMPassManagerRef")] LLVMOpaquePassManager* PM);
48534850

4854-
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMAddInstructionCombiningPass", ExactSpelling = true)]
4855-
public static extern void AddInstructionCombiningPass([NativeTypeName("LLVMPassManagerRef")] LLVMOpaquePassManager* PM);
4856-
48574851
[DllImport("libLLVM", CallingConvention = CallingConvention.Cdecl, EntryPoint = "LLVMAddInstructionSimplifyPass", ExactSpelling = true)]
48584852
public static extern void AddInstructionSimplifyPass([NativeTypeName("LLVMPassManagerRef")] LLVMOpaquePassManager* PM);
48594853

0 commit comments

Comments
 (0)