Upgrade to LLVM 15.0
At time of writing, the latest LLVM version is 15.0.6. The current libLLVM implementation uses opaque pointers but LLVMSharp doesn't support them. A workaround of sorts is to turn off opaque pointers:
[DllImport("libLLVM", EntryPoint = "LLVMContextSetOpaquePointers", CallingConvention = CallingConvention.Cdecl)]
public static extern LLVMContextRef LLVMContextSetOpaquePointers(LLVMContextRef C, LLVMBool OpaquePointers);
LLVMContextSetOpaquePointers(myContext, false);
After I made this issue, I found @tannergooding already started work: https://github.com/dotnet/LLVMSharp/releases/tag/v15.0.0-beta1
~~Are there any nuget packages for v15 ?~~ Ignore that, I was using feeds from https://pkgs.dev.azure.com/dnceng/public/ only
Can opaque pointers be used in LLVM sharp v15, I can't see how to get the type from the context/addr. space?
I am not an authority on it, but I believe the way to get an opaque pointer type is to create any pointer type as usual (while opaque pointers are enabled).