Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set_opaque_pointers to Context #489

Open
Derppening opened this issue Apr 15, 2024 · 0 comments
Open

Add set_opaque_pointers to Context #489

Derppening opened this issue Apr 15, 2024 · 0 comments

Comments

@Derppening
Copy link

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.

@TheDan64 TheDan64 added this to the 0.5.0 milestone Apr 26, 2024
@TheDan64 TheDan64 modified the milestones: 0.5.0, 0.6.0 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants