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

Deprecate LLVM typed pointers #13172

Conversation

HertzDevil
Copy link
Contributor

Part of #12743. This PR adds the actual deprecation notices to methods that assume the availability of typed pointers.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to maybe add to the deprecation message that these deprecations apply for LLVM 15+.
Or actually, do I understand correctly, that these deprecated methods already won't work when targeting LLVM 15+? So it's not just deprecated, it's already broken for recent LLVM?

src/llvm/lib_llvm.cr Outdated Show resolved Hide resolved
@HertzDevil
Copy link
Contributor Author

The LLVMBuild* funs are deprecated in LLVM 15, and not exported at all in 16+. It seems LLVMContextSetOpaquePointers is exported in both 15 and 16, but that doesn't matter to us.

@straight-shoota
Copy link
Member

straight-shoota commented Mar 9, 2023

Okay, then I suppose for LLVM 16 support we should add compile time errors to these methods that indicate that they're not supported with LLVM 16+.
For now (including LLVM 15) it's fine to just have deprecations.
We could consider making the deprecations actually dependent on the LLVM version as well (only mark them as deprecated when targeting LLVM 15 because they're technically fine to use with older LLVM versions), but I don't think that makes sense. They should be deprecated in general and we advise against using them in favour of the future-proof alternative.

@HertzDevil HertzDevil merged commit 1e0df7d into crystal-lang:feature/llvm-opaque-pointers Mar 9, 2023
@HertzDevil HertzDevil deleted the feature/deprecate-typed-pointers branch March 9, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants