LLVMSharp icon indicating copy to clipboard operation
LLVMSharp copied to clipboard

Upgrade to LLVM 15.0

Open geoff-m opened this issue 2 years ago • 4 comments

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);

geoff-m avatar Dec 05 '22 07:12 geoff-m

After I made this issue, I found @tannergooding already started work: https://github.com/dotnet/LLVMSharp/releases/tag/v15.0.0-beta1

geoff-m avatar Dec 05 '22 07:12 geoff-m

~~Are there any nuget packages for v15 ?~~ Ignore that, I was using feeds from https://pkgs.dev.azure.com/dnceng/public/ only

yowl avatar Dec 22 '22 18:12 yowl

Can opaque pointers be used in LLVM sharp v15, I can't see how to get the type from the context/addr. space?

yowl avatar Dec 22 '22 23:12 yowl

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).

geoff-m avatar Dec 23 '22 01:12 geoff-m