Avoid passing addrspacecast to lifetime intrinsics

Since LLVM 22 the alloca must be passed directly. Do this by
stripping the addrspacecast if it exists.
This commit is contained in:
Nikita Popov 2026-01-06 12:14:36 +01:00
parent bf3ac98d69
commit 0be66603ac
4 changed files with 18 additions and 1 deletions

View file

@ -1760,6 +1760,10 @@ extern "C" bool LLVMRustIsNonGVFunctionPointerTy(LLVMValueRef V) {
return false;
}
extern "C" LLVMValueRef LLVMRustStripPointerCasts(LLVMValueRef V) {
return wrap(unwrap(V)->stripPointerCasts());
}
extern "C" bool LLVMRustLLVMHasZlibCompression() {
return llvm::compression::zlib::isAvailable();
}