Is your feature request related to a problem? Please describe.
468 introduced opaque pointers, and in the PR opaque pointers are enabled by default with no opt-out mechanism.
Describe the solution you'd like
Add Context::set_opaque_pointers by using LLVMContextSetOpaquePointers in LLVM's C bindings, which is present in LLVM 15, LLVM 16.
Describe possible drawbacks to your solution
Since opaque pointers are enabled by default since LLVM 15, there should be no drawbacks as the default already utilizes opaque pointers; Users will need to explicitly opt-in to the legacy behavior by invoking the function.
Describe alternatives you've considered
None. Forcing LLVM 15/16 users to use opaque pointers may be an alternative as it is recommended for users to migrate over anyways, but there may be users that use LLVM 15 where the status of opaque pointers is (source):
LLVM 15: Opaque pointers are enabled by default. Typed pointers are still supported.
Is your feature request related to a problem? Please describe.
468 introduced opaque pointers, and in the PR opaque pointers are enabled by default with no opt-out mechanism.
Describe the solution you'd like Add
Context::set_opaque_pointers
by usingLLVMContextSetOpaquePointers
in LLVM's C bindings, which is present in LLVM 15, LLVM 16.Describe possible drawbacks to your solution Since opaque pointers are enabled by default since LLVM 15, there should be no drawbacks as the default already utilizes opaque pointers; Users will need to explicitly opt-in to the legacy behavior by invoking the function.
Describe alternatives you've considered None. Forcing LLVM 15/16 users to use opaque pointers may be an alternative as it is recommended for users to migrate over anyways, but there may be users that use LLVM 15 where the status of opaque pointers is (source):