Skip to content

llvm_passes: adapt to LLVM 24 API removals - #1418

Draft
pvelesko wants to merge 1 commit into
mainfrom
2026-08-03-llvm24-support
Draft

llvm_passes: adapt to LLVM 24 API removals#1418
pvelesko wants to merge 1 commit into
mainfrom
2026-08-03-llvm24-support

Conversation

@pvelesko

@pvelesko pvelesko commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

LLVM 24 removes four interfaces the passes still used:

  • PointerType::get(Type *, unsigned), the typed-pointer form
  • Type::getPointerTo()
  • CallInst::Create(FunctionCallee, ...)
  • the implicit conversion from Instruction * to InsertPosition

All four replacements exist in LLVM 21 through 23 as well, so there are no version guards and older toolchains are unaffected. Seven files, one migration family.

Verified by building chipStar against llvm/llvm-project main (24.0.0git): the tree configures, builds and installs cleanly with zero errors.

Independent of the LLVM 23 work in #1194; this only makes the passes compile against 24.

LLVM 24 removes four interfaces the passes still used:

- PointerType::get(Type *, unsigned) - the typed-pointer form is gone, only
  PointerType::get(LLVMContext &, unsigned) remains.
- Type::getPointerTo() - same reason.
- CallInst::Create(FunctionCallee, ...) - callers must pass the function type
  and the callee separately.
- Implicit conversion from Instruction * to InsertPosition - an iterator is
  required.

All four replacements exist in LLVM 21 through 23 as well, so no version guards
are needed and older toolchains are unaffected.

Verified by building chipStar against llvm/llvm-project main (24.0.0git).
@pvelesko
pvelesko marked this pull request as draft August 3, 2026 10:07
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