From 9e133040bc9cabf15a6de15b2ffcc30c8d522110 Mon Sep 17 00:00:00 2001 From: David Stuttard Date: Mon, 4 Dec 2023 09:59:30 +0000 Subject: [PATCH] Replace getInt8PtrTy which has now been removed from upstream LLVM This function was changed to return just getPtrTy some time ago in upstream LLVM, but the function was left in place to assist updating. The upstream function has now been removed with the instruction that anything using the getInt8PtrTy builder function should switch to getPtrTy. The code here is still required to work with typed pointers, so it is updated to work in both cases. --- shared/continuations/lib/DXILCont.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/continuations/lib/DXILCont.cpp b/shared/continuations/lib/DXILCont.cpp index 690f5c4196..46da4202de 100644 --- a/shared/continuations/lib/DXILCont.cpp +++ b/shared/continuations/lib/DXILCont.cpp @@ -311,7 +311,8 @@ Value *llvm::continuationStackOffsetToPtr(IRBuilder<> &B, Value *Offset) { // Stack lives in global memory, so add the base address assert(*StackAddrspace == ContStackAddrspace::Global && "Unexpected address space of the continuation stack"); - auto *PtrTy = B.getInt8PtrTy(static_cast(*StackAddrspace)); + auto *PtrTy = + B.getInt8Ty()->getPointerTo(static_cast(*StackAddrspace)); Value *BaseAddr = B.CreateCall(getContinuationStackGlobalMemBase(*M)); BaseAddr = B.CreateIntToPtr(BaseAddr, PtrTy);