Skip to content

Commit e96d63a

Browse files
authored
Update after ArrayRef(std::nullopt) deprecation (#3248)
Update for llvm-project commit 2529de5c935a ("[ADT] Deprecate ArrayRef(std::nullopt) (#146011)", 2025-06-27).
1 parent dcfd949 commit e96d63a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/SPIRV/SPIRVReader.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
700700
if (!LM)
701701
return;
702702

703-
auto Temp = MDNode::getTemporary(*Context, std::nullopt);
703+
auto Temp = MDNode::getTemporary(*Context, {});
704704
auto *Self = MDNode::get(*Context, Temp.get());
705705
Self->replaceOperandWith(0, Self);
706706
SPIRVWord LC = LM->getLoopControl();
@@ -850,8 +850,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
850850
// Emit a distinct index group that will be referenced from
851851
// llvm.loop.parallel_access_indices metadata; hash the new
852852
// MDNode for future accesses to the same memory.
853-
CurrentDepthIdxGroup =
854-
llvm::MDNode::getDistinct(*Context, std::nullopt);
853+
CurrentDepthIdxGroup = llvm::MDNode::getDistinct(*Context, {});
855854
OffsetIdxGroupMap.emplace(Info, CurrentDepthIdxGroup);
856855
} else {
857856
// Previous accesses to that field have already been indexed,
@@ -861,8 +860,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
861860
} else /* Regular kernel-scope array/pointer variable */ {
862861
// Emit a distinct index group that will be referenced from
863862
// llvm.loop.parallel_access_indices metadata
864-
CurrentDepthIdxGroup =
865-
llvm::MDNode::getDistinct(*Context, std::nullopt);
863+
CurrentDepthIdxGroup = llvm::MDNode::getDistinct(*Context, {});
866864
}
867865

868866
unsigned Safelen = PointerSflnMap.find(ArrayGEPIt.first)->second;

0 commit comments

Comments
 (0)