inkwell
inkwell copied to clipboard
Expose LLVMGetIntrinsicDeclaration
Is your feature request related to a problem? Please describe.
I want to use some intrinsics (namely llvm.usub.with.overflow.*). It seems it is possible to use them by defining the signature manually, but it seems that C API exposes LLVMGetIntrinsicDeclaration which is a bit nicer to use.
Describe the solution you'd like
Expose a safe wrapper for LLVMGetIntrinsicDeclaration with which I would be able to get intrinsics by their name and overload types without needing to supply full signature.
Describe possible drawbacks to your solution Not sure
Describe alternatives you've considered I can manually declare all intrinsics I need, but I feel like it would be more error-prone and difficult to maintain.