Skip to content

Cleanup typed pointer holdovers in clang-offload-wrapper #19370

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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

ldrumm
Copy link
Contributor

@ldrumm ldrumm commented Jul 9, 2025

The overload llvm::PointerType::getUnqual(ElementTy *) is now simply a wrapper around llvm::PointerType::getUnqual(Context &) i.e.

PointerType *llvm::PointerType::getUnqual(ElementTy *E) {
  return getUnqual(E->getContext());
}

(ignoring the attributes that raised the deprecation warning in the first place)

Since there's no longer a possible distinction between the returned types, we can get rid of all the typed getters and simply cache the unqualified opaque pointer type on first use.

@ldrumm ldrumm requested a review from a team as a code owner July 9, 2025 15:27
@ldrumm ldrumm force-pushed the no-typed-ptrs-no-more branch from ad6df41 to 70459b6 Compare July 9, 2025 15:28
The overload llvm::PointerType::getUnqual(ElementTy *) is now simply a
wrapper around `llvm::PointerType::getUnqual(Context &)` i.e.
PointerType *llvm::PointerType::getUnqual(ElementTy *E) {
  return getUnqual(E->getContext());
}

Since there's no longer a possible distinction between the returned
types, we can get rid of all the typed getters and simply cached the
unqualified opaque pointer type on first use.
@ldrumm ldrumm force-pushed the no-typed-ptrs-no-more branch from 70459b6 to f47c8c8 Compare July 9, 2025 16:16
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 16:16 — with GitHub Actions Inactive
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 17:11 — with GitHub Actions Inactive
@ldrumm ldrumm temporarily deployed to WindowsCILock July 9, 2025 17:11 — with GitHub Actions Inactive
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