Skip to content

Commit

Permalink
Fix invalid pointer accesses. (#2736)
Browse files Browse the repository at this point in the history
This part of code was not compiled, so it did not fail Jenkins.
Introduced by #2725 and #2721

Co-authored-by: Thomas Symalla <[email protected]>
  • Loading branch information
tsymalla and tsymalla-AMD authored Sep 28, 2023
1 parent 6ca60f4 commit 30e8934
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shared/continuations/lib/LowerRaytracingPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,8 @@ void LowerRaytracingPipelinePassImpl::handleContinuationStackIsGlobal(
ConstantInt::getBool(*Context, MetadataState.isGlobalAddressSpace());

llvm::forEachCall(Func, [&](llvm::CallInst &CInst) {
CInst->replaceAllUsesWith(IsGlobal);
CInst->eraseFromParent();
CInst.replaceAllUsesWith(IsGlobal);
CInst.eraseFromParent();
});
}

Expand All @@ -775,8 +775,8 @@ void LowerRaytracingPipelinePassImpl::handleGetFuncAddr(Function &Func) {
Addr = ConstantExpr::getPtrToInt(Addr, Func.getReturnType());

llvm::forEachCall(Func, [&](llvm::CallInst &CInst) {
CInst->replaceAllUsesWith(Addr);
CInst->eraseFromParent();
CInst.replaceAllUsesWith(Addr);
CInst.eraseFromParent();
});
}

Expand Down

0 comments on commit 30e8934

Please sign in to comment.