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

[frontend] Replace calls to deprecated function getAlignment (#304). #309

Merged

Conversation

ivanperez-keera
Copy link
Collaborator

The function llvm::AllocaInst::getAlignment was deprecated in llvm-14 and removed in llvm-15. To facilitate IKOS working with newer versions of llvm, we should replace calls to getAlignment() with calls to getAlign().value().

This commit replaces several occurrences of getAlignment with calls to getAlign. The replacement only occurs in cases where it is clear that the expansion is possible (there is an alignment). Other calls (e.g., when the call returns an optional value) are not replaced, since there is a disagreement between the current implementation of getAlignment for those classes in terms of the new getAlign and the current interface of MaybeAlign.

@ivanperez-keera ivanperez-keera changed the title frontend: Replace calls to deprecated getAlignment (#304). frontend: Replace calls to deprecated getAlignment (#304). Dec 31, 2024
…-VnV#304).

The function llvm::AllocaInst::getAlignment was deprecated in llvm-14
and removed in llvm-15. To facilitate IKOS working with newer versions
of llvm, we should replace calls to getAlignment().

This commit replaces several occurrences of getAlignment with calls to
getAlign().value(). The replacement is only applied in cases where it is
clear that the an alignment exists (the function getAlign returns an
Align), as opposed to places where the alignment may be optional (where
the function getAlign returns a MaybeAlign).
@ivanperez-keera ivanperez-keera changed the title frontend: Replace calls to deprecated getAlignment (#304). [frontend] Replace calls to deprecated getAlignment (#304). Dec 31, 2024
@ivanperez-keera ivanperez-keera changed the title [frontend] Replace calls to deprecated getAlignment (#304). [frontend] Replace calls to deprecated function getAlignment (#304). Dec 31, 2024
@ivanperez-keera ivanperez-keera merged commit 9268e4e into NASA-SW-VnV:master Dec 31, 2024
2 checks passed
@ivanperez-keera ivanperez-keera deleted the develop-getAlignment branch December 31, 2024 21:25
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.

1 participant