These APIs have analogues in the C-API, and currently there's no way to access the API I need.
This is the workaround I've come up with, but it's not ideal, so if this could be added to the public API, that would be great.
internal static class LlvmTypeHelpers
{
extension(Type)
{
public static Type GetInt128Ty(LLVMContext context)
{
var typeRef = context.Handle.Int128Type;
return context.GetOrCreate(typeRef);
}
}
[UnsafeAccessor(UnsafeAccessorKind.Method, Name = "GetOrCreate")]
private static extern Type GetOrCreate(this LLVMContext context, LLVMTypeRef typeRef);
}
These APIs have analogues in the C-API, and currently there's no way to access the API I need.
This is the workaround I've come up with, but it's not ideal, so if this could be added to the public API, that would be great.