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

[NFC] Avoid deprecated Type::getPointerTo. #584

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

hvdijk
Copy link
Collaborator

@hvdijk hvdijk commented Nov 11, 2024

Overview

[NFC] Avoid deprecated Type::getPointerTo.

Reason for change

Type::getPointerTo has been deprecated in favour of PointerType::get.

Description of change

This commit updates the calls accordingly.

Anything else we should know?

Exceptions:

  • Some uses were to perform bitcasts between pointer types. These bitcasts did nothing ever since LLVM moved to opaque pointers, and are removed instead.
  • Some uses were in a context where an IRBuilder was available, in which case IRBuilder::getPtrTy provides a simpler alternative.

Checklist

  • Read and follow the project Code of Conduct.
  • Make sure the project builds successfully with your changes.
  • Run relevant testing locally to avoid regressions.
  • Run clang-format-19 on all modified code.

Type::getPointerTo has been deprecated in favour of PointerType::get.
This commit updates the calls accordingly.

Exceptions:
- Some uses were to perform bitcasts between pointer types. These
  bitcasts did nothing ever since LLVM moved to opaque pointers, and are
  removed instead.
- Some uses were in a context where an IRBuilder was available, in which
  case IRBuilder::getPtrTy provides a simpler alternative.
@hvdijk hvdijk force-pushed the avoid-deprecated-getpointerto branch from d76623e to 91a39fe Compare November 11, 2024 20:15
@hvdijk hvdijk merged commit 6ca1e93 into uxlfoundation:main Nov 12, 2024
13 checks passed
@hvdijk hvdijk deleted the avoid-deprecated-getpointerto branch November 12, 2024 09:23
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