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

Replace deprecated functions in LLVM14 with new ones #344

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

ytoml
Copy link
Contributor

@ytoml ytoml commented Aug 24, 2022

Description

All functions deprecated since llvm14 are replaced with recommended alternatives.
Other deprecations (e.g. LLVMSetCurrentDebugLocation in builder.rs, deprecated since llvm9.0 ) are untouched.

Related Issue

I thought it might fix SEGV in #343, but actually it doesn't.
However, such deprecation removal is always recommended and seems to have no room to argument, I just have directly opened this issue 😃.

How This Has Been Tested

I have run test on Ubuntu22.04 LTS (x86_64 VM instance).
Since this is change only related to llvm14-0 feature, I tested with:

cargo test --target=x86_64-unknown-linux-gnu --features=llvm14-0 --all

All tests and doctests are successfully passed.

Breaking Changes

It does not break existing APIs, but I added implementation of AsTypeRef for CallableValue in order to get function type because it's required by LLVMBuildCall2 and LLVMBuildInvoke2.

Checklist

@ytoml ytoml changed the title Replace deprecate functions in LLVM14 with new ones Replace deprecated functions in LLVM14 with new ones Aug 24, 2022
@ytoml ytoml mentioned this pull request Aug 24, 2022
@TheDan64 TheDan64 self-requested a review August 25, 2022 00:56
src/builder.rs Outdated Show resolved Hide resolved
src/builder.rs Outdated Show resolved Hide resolved
@TheDan64 TheDan64 added this to the 0.1.0 milestone Aug 26, 2022
Copy link
Owner

@TheDan64 TheDan64 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ytoml
Copy link
Contributor Author

ytoml commented Aug 26, 2022

Sorry I forgot remove #[llvm_versions(14.0..=latest)] from import section in collable_value.rs thus CI fails.

@TheDan64 TheDan64 merged commit cc07bec into TheDan64:master Aug 26, 2022
@ytoml ytoml deleted the remove-llvm14-deprecations branch August 26, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants