From d9e871ae7e694dc2e7bb3b78b79a02631f83aed1 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 14 Jan 2025 16:29:53 +0100 Subject: [PATCH] Update for deprecation of llvm::PointerUnion::get (#2961) Update for llvm-project commit abba01adad5d ("[ADT] Deprecate PointerUnion::{is,get} (NFC) (#122623)", 2025-01-13). --- lib/SPIRV/SPIRVToLLVMDbgTran.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp index 7b94b2aeb..5ec5ed285 100644 --- a/lib/SPIRV/SPIRVToLLVMDbgTran.cpp +++ b/lib/SPIRV/SPIRVToLLVMDbgTran.cpp @@ -421,7 +421,7 @@ SPIRVToLLVMDbgTran::transTypeArrayNonSemantic(const SPIRVExtInst *DebugInst) { if (DebugInst->getExtOp() == SPIRVDebug::TypeArray) { for (size_t I = SubrangesIdx; I < Ops.size(); ++I) { auto *SR = transDebugInst(BM->get(Ops[I])); - if (auto *Count = SR->getCount().get()) + if (auto *Count = cast(SR->getCount())) TotalCount *= Count->getSExtValue() > 0 ? Count->getSExtValue() : 0; Subscripts.push_back(SR); } @@ -444,7 +444,7 @@ SPIRVToLLVMDbgTran::transTypeArrayDynamic(const SPIRVExtInst *DebugInst) { SmallVector Subscripts; for (size_t I = SubrangesIdx; I < Ops.size(); ++I) { auto *SR = transDebugInst(BM->get(Ops[I])); - if (auto *Count = SR->getCount().get()) + if (auto *Count = cast(SR->getCount())) TotalCount *= Count->getSExtValue() > 0 ? Count->getSExtValue() : 0; Subscripts.push_back(SR); } @@ -1607,10 +1607,10 @@ SPIRVToLLVMDbgTran::transDebugIntrinsic(const SPIRVExtInst *DebugInst, if (!MDs.empty()) { DIArgList *AL = DIArgList::get(M->getContext(), MDs); if (M->IsNewDbgInfoFormat) { - cast(DbgValIntr.get()) + cast(cast(DbgValIntr)) ->setRawLocation(AL); } else { - cast(DbgValIntr.get()) + cast(cast(DbgValIntr)) ->setRawLocation(AL); } }